{% if data.git_info %}
    {% if data.git_info.repos_info or data.git_info.access_errors %}
        <h2 class="m-3 text-center">
            GIT Information
            <button class="text-primary bg-transparent box-shadow-none border-0" onclick='copyElementContent("{{ id }}-anchor")'>
                <i class="fa fa-link fs-3" aria-hidden="true"></i>
            </button>
            <div id="{{ id }}-anchor" class="hidden d-none">
                {{ full_url ~ '#' ~ id }}
            </div>
        </h2>
        <div class="card border-dark mb-4 mt-3">
            <div class="card-header bg-dark text-white fw-bold">
                {{ _('GIT Repositories') }}
            </div>
            <div class="card-body">
                <table class="table">
                    <thead>
                        <tr>
                            <th scope="col">Project</th>
                            <th scope="col">Head</th>
                            <th scope="col">Based On</th>
                            <th scope="col">Commit</th>
                            <th scope="col">Remotes</th>
                        </tr>
                    </thead>
                    <tbody>
                        {% for data in data.git_info.repos_info %}
                            <tr>
                                <td>{{ data.name }}</td>
                                <td>{{ data.head }}</td>
                                <td>{{ data.on }}</td>
                                <td>{{ data.commit }}</td>
                                <td>
                                    {% for remote in data.remotes %}
                                        <div class="mb-2">
                                            <div>
                                                Name: {{ remote.name }}
                                            </div>
                                            <div>
                                                URL: <a href="{{ remote.url }}" target="_blank">{{ remote.url }}</a>
                                            </div>
                                        </div>
                                    {% endfor %}
                                </td>
                            </tr>
                        {% endfor %}
                    </tbody>
                </table>
            </div>
        </div>
        {% if data.git_info.access_errors %}
            <div class="accordion">
                <div class="accordion-item mb-3 border">
                    <h3 class="accordion-header" id="git-errors-heading">
                        <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#git-errors" aria-expanded="false" aria-controls="git-errors">
                            <div class="d-flex">
                                <span class="h4 mb-0">{{ _('Repos with errors') }}</span>
                            </div>
                        </button>
                    </h3>
                    <div id="git-errors" class="accordion-collapse collapse" aria-labelledby="git-errors-heading">
                        <div class="accordion-body">
                            <ul class="list-group">
                                {% for  name, error in data.git_info.access_errors.items() %}
                                    <li class="list-group-item">
                                        <div class="h4">{{ name }}</div>
                                        <div>
                                            {{ error }}
                                        </div>
                                    </li>
                                {% endfor %}
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        {% endif %}
    {% endif %}
{% endif %}