<div id="svn-homepage">
    <h2>{{ title_list_repositories }}</h2>

    {{# is_admin }}
    <form name="svn-repo-creator" class="form-inline" method="post" action="/plugins/svn/?group_id={{group_id}}&action=create-repository">
        {{# csrf_token }}
            {{> csrf_token_input }}
        {{/ csrf_token }}

        <div class="input-append">
            <input type="text"
                id="create-repository-field-name"
                data-test="create-repository-field-name"
                name="repo_name"
                value="{{ repository_name }}"
                placeholder="{{ label_repository_name }}"
                pattern="{{ validate_name }}"
                required
            />
            <input type="submit"
                   name="repo_add"
                   value="{{ create_repository }}"
                   data-test="create-repository"
                   class="btn btn-primary"
            />
        </div>
        <span class="help">{{ help_repository_name }}</span>
    </form>
    {{/ is_admin }}

    <table class="table">
        <thead>
        <tr>
            <th>{{ table_head_list_repository }}</th>
            <th>{{ last_commit }}</th>
            {{# is_admin }}
                <th>
                    {{ settings_label }}
                </th>
            {{/ is_admin }}
        </tr>
        </thead>
        <tbody>
        {{# repository_list }}
            {{# repository }}
                <tr>
                    <td><a href="?roottype=svn&amp;root={{ getFullName }}" data-test="svn-repository-access-{{ getName }}">{{ getName }}</a></td>
                    <td>{{{ purified_commit_date }}}</td>
                    {{# is_admin }}
                        <td>
                            <a href="{{ getSettingUrl }}" class="btn" data-test="svn-admin-repository-access">
                                <i class="fa fa-cog"></i> {{ settings_button }}
                            </a>
                        </td>
                    {{/ is_admin }}
                </tr>
            {{/ repository }}
        {{/ repository_list }}
        {{^ repository_list }}
            <tr>
                <td class="table-cell-empty"
                    {{# is_admin }}
                    colspan="3"
                    {{/ is_admin }}
                    {{^ is_admin }}
                    colspan="3"
                    {{/ is_admin }}
                >
                    {{ no_repositories }}
                </td>
            </tr>
        {{/ repository_list }}
        </tbody>
    </table>
</div>
