<commit_before>
{{#extend "lib/loggedin" notitle="true"}}
    {{#content "styles" mode="append"}}
        <link rel="stylesheet" href="/styles/teams/teams.css"/>
        <link rel="stylesheet" href="/styles/files/files.css"/>
        <link rel="stylesheet" href="/styles/teams/team.css"/>
        <link rel="stylesheet" href="/vendor/jquery/jquery-ui.css"/>
    {{/content}}

    {{#content "scripts" mode="append"}}
        <script src="/scripts/jquery/jquery-ui.min.js" type="text/javascript" defer></script>
        <script src="/scripts/jquery/jquery.ui.touch-punch.js" type="text/javascript" defer></script>
        <script src="/scripts/dropzone/dropzone.js" type="text/javascript" defer></script>
        <script src="/scripts/files.js" type="text/javascript" defer></script>
        <script src="/scripts/teams.js" type="text/javascript" defer></script>
        <script src="/scripts/tabbar.js" type="text/javascript" defer></script>
    {{/content}}

    {{#content "page"}}
     <div id="team-wrapper">

        <section class="section-teams" data-id="{{../_id}}">
            <a href="/teams/{{_id}}/members" class="btn-member" title="Teammitglieder">
                <i class="fa fa-users"></i>
                {{arrayLength course.userIds}}
            </a>
            <div class="dropdown dropdown-title minimal-button">
                <a class="dropdown-toggle btn-title-dropdown" title="Weiteres" data-toggle="dropdown">
                    <h2 id="page-title" class="h4 title-headline">{{{stripOnlyScript ../name}}}</h2>
                    <i class="fa fa-cog i-cog"></i>
                </a>
                <div class="dropdown-menu dropdown-menu dropdown-menu-team">
                    <a href="/teams/{{_id}}/members" class="dropdown-item">
                        <i class="fa fa-users" aria-hidden="true"></i> Teammitglieder verwalten
                    </a>
                    {{#userHasPermission "TEAM_EDIT"}}
                        {{#inArray "RENAME_TEAM"../ permissions}}
                            <a href="/teams/{{../_id}}/edit" class="dropdown-item">
                                <i class="fa fa-edit" aria-hidden="true"></i> Team bearbeiten
                            </a>
                        {{/inArray}}
                        {{#if ../couldLeave}}
                            {{#inArray "LEAVE_TEAM" ../permissions}}
                                <a href="/teams/{{../_id}}/member"
                                class="dropdown-item dropdown-leave-team"
                                data-user-id="{{../userId}}"
                                redirect="/teams/">
                                    <i class="fa fa-sign-out" aria-hidden="true"></i> Team verlassen
                                </a>
                            {{/inArray}}
                        {{/if}}
                        {{#inArray "DELETE_TEAM" ../permissions}}
                            <a href="/teams/{{../_id}}/"
                            class="dropdown-item"
                            target="_blank"
                            data-method="DELETE"
                            data-name="{{../name}}"
                            redirect="/teams/">
                                <i class="fa fa-trash" aria-hidden="true"></i> Team löschen
                            </a>
                        {{/inArray}}
                    {{/userHasPermission}}
                </div>
            </div>

            <section class="row section-description">
                <div class="col-sm-12">
                    <p class="lead">{{description}}</p>
                </div>
            </section>

            {{#if rocketChatURL}}
            <section class="section-chat" style="margin-top: 2rem">
                <h3 class="h4">Chat</h3>
                <div class="rocketchat">
                    <iframe src="{{rocketChatURL}}?layout=embedded" frameborder="0"></iframe>
                </div>
            </section>
            {{/if}}


            <div class="course-card">
                <div class="tabContainer">
                    <div class="tabs" data-max-width="1024">
                        <button class="tab" data-tab="a">
                            <span class="text">Dateien</span>
                        </button>
                        <button class="tab" data-tab="b">
                            <span class="text">Neuigkeiten</span>
                        </button>
                        <button class="tab" data-tab="c">
                            <span class="text">Termine</span>
                        </button>
                    </div>
                </div>
                <div class="sectionsContainer">
                    <div class="sections">
                        <!-- Dateien -->
                        <div class="section" data-section="a">
                            {{#if canUploadFile}}
                                    {{#embed "files/file-upload"}}{{/embed}}
                                {{/if}}

                                {{#ifneq 0 (arrayLength directories)}}
                                    <section style="margin-top: 1rem" class="directories">
                                        <h5 style="color: #373a3c">Ordner</h5>
                                        <div class="row">
                                            {{#each ../directories}}
                                                <div class="col-sm-6 col-xs-12 col-md-4">
                                                    <div class="card card-block folder" onclick="location.href = '/files/teams/{{../../_id}}/{{this._id}}';">
                                                        <strong class="card-title-directory">
                                                            <i class="fa fa-folder" aria-hidden="true"></i> {{this.name}}
                                                        </strong>
                                                        {{#userHasPermission "FOLDER_DELETE"}}
                                                            <a href="/files/directory/"
                                                            target="_blank"
                                                            data-method="delete"
                                                            title="Ordner löschen"
                                                            data-file-name="{{../this.name}}"
                                                            data-file-id="{{../this._id}}"
                                                            >
                                                                <i class="fa fa-trash-o pull-right"></i>
                                                            </a>

                                                            <a href="/directoryModel/{{../this._id}}/rename"
                                                            target="_blank"
                                                            data-method="dir-rename"
                                                            title="Ordner umbenennen"
                                                            data-directory-id="{{../this._id}}"
                                                            data-directory-name="{{../this.name}}"
                                                            >
                                                                <i class="fa fa-edit pull-right"></i>
                                                            </a>
                                                            {{#inArray "EDIT_ALL_FILES" ../../../permissions}}
                                                                <a href="/directoryModel/{{../this._id}}/share"
                                                                target="_blank"
                                                                class="btn-file-share"
                                                                data-method="dir-share"
                                                                title="Ordner-Freigabe"
                                                                data-file-id="{{../this._id}}"
                                                                data-file-name="{{../this.name}}"
                                                                >
                                                                    <i class="fa fa-share-alt pull-right"></i>
                                                                </a>
                                                            {{/inArray}}
                                                        {{/userHasPermission}}
                                                    </div>
                                                </div>
                                            {{/each}}
                                        </div>
                                    </section>
                                {{/ifneq}}

                                <section style="padding-top: 2rem; clear: both" class="row">
                                    <div class="col-sm-12">
                                        {{#ifneq 0 (arrayLength files)}}
                                            <h5 style="padding: 10px 0 20px">Dateien</h5>
                                        {{/ifneq}}
                                        {{#embed "files/file-viewer"}}{{/embed}}
                                        {{#embed "files/files-grid" files=files teamFiles=true canEditPermissions=canEditPermissions teamId=../_id}}{{/embed}}
                                    </div>
                                </section>

                                <section style="margin-top: 1rem">
                                    <h5 style="padding: 10px 0 20px">Datei-Aktionen</h5>

                                    <a href="{{filesUrl}}" class="btn btn-add btn-secondary">
                                        <i class="fa fa-folder-open"></i> Zu den Team-Dateien
                                    </a>
                                    <button class="btn btn-add btn-secondary btn-file-permissions">
                                        <i class="fa fa-share-alt"></i> Freigabe-Einstellungen ändern
                                    </button>
                                    {{#if ../canCreateDir}}
                                        <span class="btn btn-primary create-directory">
                                            <i class="fa fa-folder" aria-hidden="true"></i> Ordner erstellen
                                        </span>
                                    {{/if}}
                                    {{!-- {{#if ../canCreateFile}}
                                        <span class="btn btn-secondary new-file" data-file-path="{{this.path}}">
                                            <i class="fa fa-plus" aria-hidden="true"></i> Neue Datei erstellen
                                        </span>
                                    {{/if}}                 --}}
                                </section>

                        </div>
                        <!--- Neuigkeiten -->
                        <div class="section" data-section="b">
                            {{> 'dashboard/components/card_section' section-id="news" title="" content=news link-text="Weiterlesen"}}
                            <a href="/teams/{{../_id}}/news" class="">
                                Alle Neuigkeiten anzeigen...
                            </a>
                            {{#inArray "CREATE_NEWS" permissions}}
                                <a href="/teams/{{../_id}}/news/new" class="btn btn-add btn-primary pull-right">
                                    <i class="fa fa-plus" aria-hidden="true"></i> Neuigkeit anlegen
                                </a>
                            {{/inArray}}
                        </div>
                        <!-- Termine -->
                        <div class="section" data-section="c">
                            <div class="row">
                                {{#each ../events}}
                                    {{> 'calendar/card' event=this}}
                                {{/each}}
                            </div>
                            <div style="margin-top: .5rem">
                                {{#inArray "CREATE_NEWS" permissions}}
                                    <button class="btn btn-add btn-primary btn-create-event pull-right">
                                        Termin anlegen
                                    </button>
                                {{/inArray}}
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Vorerst ausblenden, bis wir Themen in Teams wieder unterstützen
			<section class="row">
                <div class="col-sm-12">
                    <h4>Themen & Aufgaben</h4>
                    <p>Finde alle Themen, Tools und Aufgaben zu diesem Team.</p>
                    <a href="/teams/{{_id}}/topics" class="btn btn-add btn-secondary">
                        Zur Themen-Übersicht
                    </a>
                </div>
            </section> -->

            {{#embed "lib/components/modal" class="delete-modal" title="Bist du dir sicher?"}}
                {{#content "body"}}

                    <div class="modal-footer">
                        <button type="button" class="btn btn-secondary btn-close">
                            Abbrechen
                        </button>

                        <button type="submit" class="btn btn-primary btn-submit">
                            Löschen
                        </button>
                    </div>
                {{/content}}
            {{/embed}}

            {{#embed "lib/components/modal-form" class="file-permissions-modal" title="Freigabe-Einstellungen ändern"}}
                {{#content "fields"}}
                    {{> "teams/forms/form-file-permissions" teamFiles=true}}
                {{/content}}
            {{/embed}}

            {{#embed "lib/components/modal-form" action=leaveTeamAction class="leave-team-modal"}}
                {{#content "fields"}}
                    {{> "teams/forms/form-leave-team"}}
                {{/content}}
            {{/embed}}

            {{#embed "lib/components/modal-form" class="create-event-modal" action=../createEventAction collapseId=1 userId=../userId teamId=../teamId}}
                {{#content "fields"}}
                    {{> "calendar/forms/form-create-event"}}
                {{/content}}
            {{/embed}}

            {{#embed "lib/components/modal-form" method="put" action="/calendar/events/" class="edit-event-modal"}}
                {{#content "fields"}}
                    {{> "calendar/forms/form-create-event" addCourse="true" addTeam="true" collapseIdCourse="4" collapseIdTeam="5"}}
                {{/content}}
                {{#content "additional-actions"}}
                        <button type="button" class="btn btn-primary btn-danger btn-delete pull-left">
                            <i class="fa fa-trash-o"></i> Löschen
                        </button>
                {{/content}}
            {{/embed}}
        </section>
    </div>

    {{/content}}
{{/extend}}
<commit_msg>Removed team member count from team page<commit_after>
{{#extend "lib/loggedin" notitle="true"}}
    {{#content "styles" mode="append"}}
        <link rel="stylesheet" href="/styles/teams/teams.css"/>
        <link rel="stylesheet" href="/styles/files/files.css"/>
        <link rel="stylesheet" href="/styles/teams/team.css"/>
        <link rel="stylesheet" href="/vendor/jquery/jquery-ui.css"/>
    {{/content}}

    {{#content "scripts" mode="append"}}
        <script src="/scripts/jquery/jquery-ui.min.js" type="text/javascript" defer></script>
        <script src="/scripts/jquery/jquery.ui.touch-punch.js" type="text/javascript" defer></script>
        <script src="/scripts/dropzone/dropzone.js" type="text/javascript" defer></script>
        <script src="/scripts/files.js" type="text/javascript" defer></script>
        <script src="/scripts/teams.js" type="text/javascript" defer></script>
        <script src="/scripts/tabbar.js" type="text/javascript" defer></script>
    {{/content}}

    {{#content "page"}}
     <div id="team-wrapper">

        <section class="section-teams" data-id="{{../_id}}">
            <div class="dropdown dropdown-title minimal-button">
                <a class="dropdown-toggle btn-title-dropdown" title="Weiteres" data-toggle="dropdown">
                    <h2 id="page-title" class="h4 title-headline">{{{stripOnlyScript ../name}}}</h2>
                    <i class="fa fa-cog i-cog"></i>
                </a>
                <div class="dropdown-menu dropdown-menu dropdown-menu-team">
                    <a href="/teams/{{_id}}/members" class="dropdown-item">
                        <i class="fa fa-users" aria-hidden="true"></i> Teammitglieder verwalten
                    </a>
                    {{#userHasPermission "TEAM_EDIT"}}
                        {{#inArray "RENAME_TEAM"../ permissions}}
                            <a href="/teams/{{../_id}}/edit" class="dropdown-item">
                                <i class="fa fa-edit" aria-hidden="true"></i> Team bearbeiten
                            </a>
                        {{/inArray}}
                        {{#if ../couldLeave}}
                            {{#inArray "LEAVE_TEAM" ../permissions}}
                                <a href="/teams/{{../_id}}/member"
                                class="dropdown-item dropdown-leave-team"
                                data-user-id="{{../userId}}"
                                redirect="/teams/">
                                    <i class="fa fa-sign-out" aria-hidden="true"></i> Team verlassen
                                </a>
                            {{/inArray}}
                        {{/if}}
                        {{#inArray "DELETE_TEAM" ../permissions}}
                            <a href="/teams/{{../_id}}/"
                            class="dropdown-item"
                            target="_blank"
                            data-method="DELETE"
                            data-name="{{../name}}"
                            redirect="/teams/">
                                <i class="fa fa-trash" aria-hidden="true"></i> Team löschen
                            </a>
                        {{/inArray}}
                    {{/userHasPermission}}
                </div>
            </div>

            <section class="row section-description">
                <div class="col-sm-12">
                    <p class="lead">{{description}}</p>
                </div>
            </section>

            {{#if rocketChatURL}}
            <section class="section-chat" style="margin-top: 2rem">
                <h3 class="h4">Chat</h3>
                <div class="rocketchat">
                    <iframe src="{{rocketChatURL}}?layout=embedded" frameborder="0"></iframe>
                </div>
            </section>
            {{/if}}


            <div class="course-card">
                <div class="tabContainer">
                    <div class="tabs" data-max-width="1024">
                        <button class="tab" data-tab="a">
                            <span class="text">Dateien</span>
                        </button>
                        <button class="tab" data-tab="b">
                            <span class="text">Neuigkeiten</span>
                        </button>
                        <button class="tab" data-tab="c">
                            <span class="text">Termine</span>
                        </button>
                    </div>
                </div>
                <div class="sectionsContainer">
                    <div class="sections">
                        <!-- Dateien -->
                        <div class="section" data-section="a">
                            {{#if canUploadFile}}
                                    {{#embed "files/file-upload"}}{{/embed}}
                                {{/if}}

                                {{#ifneq 0 (arrayLength directories)}}
                                    <section style="margin-top: 1rem" class="directories">
                                        <h5 style="color: #373a3c">Ordner</h5>
                                        <div class="row">
                                            {{#each ../directories}}
                                                <div class="col-sm-6 col-xs-12 col-md-4">
                                                    <div class="card card-block folder" onclick="location.href = '/files/teams/{{../../_id}}/{{this._id}}';">
                                                        <strong class="card-title-directory">
                                                            <i class="fa fa-folder" aria-hidden="true"></i> {{this.name}}
                                                        </strong>
                                                        {{#userHasPermission "FOLDER_DELETE"}}
                                                            <a href="/files/directory/"
                                                            target="_blank"
                                                            data-method="delete"
                                                            title="Ordner löschen"
                                                            data-file-name="{{../this.name}}"
                                                            data-file-id="{{../this._id}}"
                                                            >
                                                                <i class="fa fa-trash-o pull-right"></i>
                                                            </a>

                                                            <a href="/directoryModel/{{../this._id}}/rename"
                                                            target="_blank"
                                                            data-method="dir-rename"
                                                            title="Ordner umbenennen"
                                                            data-directory-id="{{../this._id}}"
                                                            data-directory-name="{{../this.name}}"
                                                            >
                                                                <i class="fa fa-edit pull-right"></i>
                                                            </a>
                                                            {{#inArray "EDIT_ALL_FILES" ../../../permissions}}
                                                                <a href="/directoryModel/{{../this._id}}/share"
                                                                target="_blank"
                                                                class="btn-file-share"
                                                                data-method="dir-share"
                                                                title="Ordner-Freigabe"
                                                                data-file-id="{{../this._id}}"
                                                                data-file-name="{{../this.name}}"
                                                                >
                                                                    <i class="fa fa-share-alt pull-right"></i>
                                                                </a>
                                                            {{/inArray}}
                                                        {{/userHasPermission}}
                                                    </div>
                                                </div>
                                            {{/each}}
                                        </div>
                                    </section>
                                {{/ifneq}}

                                <section style="padding-top: 2rem; clear: both" class="row">
                                    <div class="col-sm-12">
                                        {{#ifneq 0 (arrayLength files)}}
                                            <h5 style="padding: 10px 0 20px">Dateien</h5>
                                        {{/ifneq}}
                                        {{#embed "files/file-viewer"}}{{/embed}}
                                        {{#embed "files/files-grid" files=files teamFiles=true canEditPermissions=canEditPermissions teamId=../_id}}{{/embed}}
                                    </div>
                                </section>

                                <section style="margin-top: 1rem">
                                    <h5 style="padding: 10px 0 20px">Datei-Aktionen</h5>

                                    <a href="{{filesUrl}}" class="btn btn-add btn-secondary">
                                        <i class="fa fa-folder-open"></i> Zu den Team-Dateien
                                    </a>
                                    <button class="btn btn-add btn-secondary btn-file-permissions">
                                        <i class="fa fa-share-alt"></i> Freigabe-Einstellungen ändern
                                    </button>
                                    {{#if ../canCreateDir}}
                                        <span class="btn btn-primary create-directory">
                                            <i class="fa fa-folder" aria-hidden="true"></i> Ordner erstellen
                                        </span>
                                    {{/if}}
                                    {{!-- {{#if ../canCreateFile}}
                                        <span class="btn btn-secondary new-file" data-file-path="{{this.path}}">
                                            <i class="fa fa-plus" aria-hidden="true"></i> Neue Datei erstellen
                                        </span>
                                    {{/if}}                 --}}
                                </section>

                        </div>
                        <!--- Neuigkeiten -->
                        <div class="section" data-section="b">
                            {{> 'dashboard/components/card_section' section-id="news" title="" content=news link-text="Weiterlesen"}}
                            <a href="/teams/{{../_id}}/news" class="">
                                Alle Neuigkeiten anzeigen...
                            </a>
                            {{#inArray "CREATE_NEWS" permissions}}
                                <a href="/teams/{{../_id}}/news/new" class="btn btn-add btn-primary pull-right">
                                    <i class="fa fa-plus" aria-hidden="true"></i> Neuigkeit anlegen
                                </a>
                            {{/inArray}}
                        </div>
                        <!-- Termine -->
                        <div class="section" data-section="c">
                            <div class="row">
                                {{#each ../events}}
                                    {{> 'calendar/card' event=this}}
                                {{/each}}
                            </div>
                            <div style="margin-top: .5rem">
                                {{#inArray "CREATE_NEWS" permissions}}
                                    <button class="btn btn-add btn-primary btn-create-event pull-right">
                                        Termin anlegen
                                    </button>
                                {{/inArray}}
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Vorerst ausblenden, bis wir Themen in Teams wieder unterstützen
			<section class="row">
                <div class="col-sm-12">
                    <h4>Themen & Aufgaben</h4>
                    <p>Finde alle Themen, Tools und Aufgaben zu diesem Team.</p>
                    <a href="/teams/{{_id}}/topics" class="btn btn-add btn-secondary">
                        Zur Themen-Übersicht
                    </a>
                </div>
            </section> -->

            {{#embed "lib/components/modal" class="delete-modal" title="Bist du dir sicher?"}}
                {{#content "body"}}

                    <div class="modal-footer">
                        <button type="button" class="btn btn-secondary btn-close">
                            Abbrechen
                        </button>

                        <button type="submit" class="btn btn-primary btn-submit">
                            Löschen
                        </button>
                    </div>
                {{/content}}
            {{/embed}}

            {{#embed "lib/components/modal-form" class="file-permissions-modal" title="Freigabe-Einstellungen ändern"}}
                {{#content "fields"}}
                    {{> "teams/forms/form-file-permissions" teamFiles=true}}
                {{/content}}
            {{/embed}}

            {{#embed "lib/components/modal-form" action=leaveTeamAction class="leave-team-modal"}}
                {{#content "fields"}}
                    {{> "teams/forms/form-leave-team"}}
                {{/content}}
            {{/embed}}

            {{#embed "lib/components/modal-form" class="create-event-modal" action=../createEventAction collapseId=1 userId=../userId teamId=../teamId}}
                {{#content "fields"}}
                    {{> "calendar/forms/form-create-event"}}
                {{/content}}
            {{/embed}}

            {{#embed "lib/components/modal-form" method="put" action="/calendar/events/" class="edit-event-modal"}}
                {{#content "fields"}}
                    {{> "calendar/forms/form-create-event" addCourse="true" addTeam="true" collapseIdCourse="4" collapseIdTeam="5"}}
                {{/content}}
                {{#content "additional-actions"}}
                        <button type="button" class="btn btn-primary btn-danger btn-delete pull-left">
                            <i class="fa fa-trash-o"></i> Löschen
                        </button>
                {{/content}}
            {{/embed}}
        </section>
    </div>

    {{/content}}
{{/extend}}

{'fraction_non_alphanumeric': 0.13088201678476963, 'fraction_numerical': 0.0034614505437089767, 'mean_word_length': 0.8179875333926981, 'pattern_counts': {'":': 0, '<': 359, '<?xml version=': 0, '>': 371, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 262, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6678518', 'n_tokens_mistral': 6759, 'n_tokens_neox': 6359, 'n_words': 1176}