{% extends "trainings/library_base.html" %}
{% load i18n staticfiles template_tools widget_tweaks %}

{% block column_main %}
    <div class="clearfix">
        {% if current_sub_section == "private_library" %}
            <h1 class="page-title pull-left">{% trans 'My activities' %}</h1>
            <div class="pull-right">
                <a href="" class="btn btn-primary" data-toggle="modal" data-target="#activity-create">
                    <i class="icon-plus icon-white"></i>{% trans "New activity" %}
                </a>
            </div>
            {% include 'trainings/trainingactivity_create.html' %}
        {% else %}
            <h1 class="page-title">{% trans 'Shared activities' %}</h1>
        {% endif %}
    </div>
    <div class="row activity-list-filters">
        <div class="col-md-8">
            {% include 'trainings/_list_filters.html' with form=filter.form %}
        </div>
        <div class="col-md-4">
            {% if is_paginated %}
                <div class="pull-right">
                    {% pagination form_id="filters" %}
                </div>
            {% endif %}
        </div>
    </div>
    <div class="panel panel-default scrolling-table-wrapper">
        {% include "trainings/trainingactivity_list_table.html" %}
    </div>
    <script type="text/javascript">
        $(document).ready(function() {
            $('.activities-table').stickyTableHeaders({scrollableArea: $('.scrolling-table-wrapper'), "fixedOffset": 1});
        });
    </script>
{% endblock %}
