{{/*
This file is part of SystemTestPortal.
Copyright (C) 2017  Institute of Software Technology, University of Stuttgart

SystemTestPortal is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

SystemTestPortal is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with SystemTestPortal.  If not, see <http://www.gnu.org/licenses/>.
*/}}

{{define "content"}}
<div class="mt-3 mb-4">
    <h2>{{T "Your Tasks" .}}</h2>
</div>
<div class="row justify-content-center">
    <div class="col-md-12">
        <!-- Nav tabs -->
        <nav class="mobile-full-width d-print-none" role="navigation">
            <ul class="nav nav-tabs" role="tablist">
                <li class="nav-item">
                    <a id="task-tab-opened"
                       class="nav-link {{if .ViewOpened}}active{{end}}"
                       data-toggle="tab"
                       href=""
                       role="tab">{{T "Open" .}}</a>
                </li>
                <li class="nav-item">
                    <a id="task-tab-closed"
                       class="nav-link {{if not .ViewOpened}}active{{end}}"
                       data-toggle="tab"
                       href=""
                       role="tab">{{T "Closed" .}}</a>
                </li>
            </ul>
        </nav>

        <div class="tab-content mobile-full-width">
            <div class="tab-pane active" id="task-tabarea" role="tabpanel">
                <div class="tab-card card" id="task-content">
                    {{template "task-content" .}}
                </div>
            </div>
        </div>
    </div>
</div>
<script src="/static/js/task/task.js"></script>
<script>
    initializeTaskTabListener()
</script>
{{ end }}