ASCII text, with very long lines (428)
        
            1
            {% extends "repo.html" %} 
        
            2
            {% set active_page = "settings" %} 
        
            3
            {% block title %} 
        
            5
                {% trans username=username, repository=repository %}Settings of {{ username }}/{{ repository }}{% endtrans %} 
        
            6
            {% endblock %} 
        
            7
            {% block content %} 
        
            8
            <x-vbox> 
        
            9
                <x-frame style="--width: 896px;" class="flexible-space"> 
        
            10
                    <x-vbox> 
        
            11
                        <article class="card"> 
        
            12
                            <section class="card-main vbox"> 
        
            13
                                <form method="post" class="vbox"> 
        
            14
                                    <x-hbox> 
        
            15
                                        <label>{% trans %}Visibility:{% endtrans %}</label> 
        
            16
                                        <label> 
        
            17
                                            <input type="radio" name="visibility" value="2" {% if repo_data.visibility == 2 %}checked{% endif %}> 
        
            18
                                            {% trans %}Public{% endtrans %} 
        
            19
                                        </label> 
        
            20
                                        <label> 
        
            21
                                            <input type="radio" name="visibility" value="1" {% if repo_data.visibility == 1 %}checked{% endif %}> 
        
            22
                                            {% trans %}Unlisted{% endtrans %} 
        
            23
                                        </label> 
        
            24
                                        <label> 
        
            25
                                            <input type="radio" name="visibility" value="0" {% if repo_data.visibility == 0 %}checked{% endif %}> 
        
            26
                                            {% trans %}Private{% endtrans %} 
        
            27
                                        </label> 
        
            28
                                    </x-hbox> 
        
            29
                                    <label for="description"> 
        
            30
                                        {% trans %}Description{% endtrans %} 
        
            31
                                        <textarea id="description" name="description" rows="4">{% if repo_data.info %}{{ repo_data.info }}{% endif %}</textarea> 
        
            32
                                    </label> 
        
            33
                                    <label for="url"> 
        
            34
                                        {% trans %}Homepage{% endtrans %} 
        
            35
                                        <input id="url" name="url" type="url" value="{% if repo_data.url %}{{ repo_data.url }}{% endif %}"> 
        
            36
                                    </label> 
        
            37
                                    <label for="default-branch"> 
        
            38
                                        {% trans %}Default branch{% endtrans %} 
        
            39
                                        <select id="default-branch" name="default_branch"> 
        
            40
                                            {% for branch in branches %} 
        
            41
                                                <option value="{{ branch }}" {% if branch == repo_data.default_branch %}selected{% endif %}>{{ branch }}</option> 
        
            42
                                            {% endfor %} 
        
            43
                                        </select> 
        
            44
                                        {% trans %}This is the branch the application will redirect to automatically if one is not specified. 
        
            45
            Note that only branch names are supported, not other references like tags or commit hashes.{% endtrans %} 
        
            46
                                    </label> 
        
            47
                                    <label for="site-branch"> 
        
            48
                                        {% trans %}Site branch{% endtrans %} 
        
            49
                                        <select id="site-branch" name="site_branch"> 
        
            50
                                            <option value="">{% trans %}No sites{% endtrans %}</option> 
        
            51
                                            {% for branch in branches %} 
        
            52
                                                <option value="{{ branch }}" {% if branch == repo_data.site_branch %}selected{% endif %}>{{ branch }}</option> 
        
            53
                                            {% endfor %} 
        
            54
                                        </select> 
        
            55
                                    </label> 
        
            56
                                    <label> 
        
            57
                                        <input type="checkbox" name="primary_site" {% if repo_data.has_site == 2 %}checked{% endif %}> 
        
            58
                                        {% trans %}Make this the primary site{% endtrans %} 
        
            59
                                    </label> 
        
            60
                                    <p> 
        
            61
                                        {% trans link=site_link, primary_link=primary_site_link %} 
        
            62
                                            Host static sites for your projects, for free. The files in your site branch will be served at 
        
            63
                                            {{ site_link }} or {{ primary_site_link }} if you make this the primary site. 
        
            64
                                        {% endtrans %} 
        
            65
                                    </p> 
        
            66
                                    <p> 
        
            67
                                        {% trans %}Even if this repository is private, the site will not have access control.{% endtrans %} 
        
            68
                                    </p> 
        
            69
                                    <h3>{% trans %}Forum labels{% endtrans %}</h3> 
        
            70
                                    <dialog id="edit-label"> 
        
            71
                                        <article class="card"> 
        
            72
                                            <section class="card-main"> 
        
            73
                                                <form method="dialog" id="close-edit-label"></form> 
        
            74
                                                <form method="POST" action="/{{ username }}/{{ repository }}/settings/edit-label"> 
        
            75
                                                    <input type="hidden" name="id" id="edit-label-id"> 
        
            76
                                                    <x-vbox> 
        
            77
                                                        <label> 
        
            78
                                                            {% trans %}Label name{% endtrans %} 
        
            79
                                                            <input type="text" id="edit-label-name" name="label" required> 
        
            80
                                                        </label> 
        
            81
                                                        <label> 
        
            82
                                                            {% trans %}Label colour{% endtrans %} 
        
            83
                                                            <input type="color" id="edit-label-colour" name="colour" value="#009688" required> 
        
            84
                                                        </label> 
        
            85
                                                        <x-buttonbox> 
        
            86
                                                            <button type="submit">{% trans %}Save{% endtrans %}</button> 
        
            87
                                                            <button type="submit" formaction="/{{ username }}/{{ repository }}/settings/delete-label">{% trans %}Delete{% endtrans %}</button> 
        
            88
                                                            <button type="submit" form="close-edit-label">{% trans %}Cancel{% endtrans %}</button> 
        
            89
                                                        </x-buttonbox> 
        
            90
                                                    </x-vbox> 
        
            91
                                                </form> 
        
            92
                                            </section> 
        
            93
                                        </article> 
        
            94
                                    </dialog> 
        
            95
                                    <ul> 
        
            96
                                        {% for label in repo_data.labels %} 
        
            97
                                            <li> 
        
            98
                                                <span class="post-label editable" onclick="document.getElementById('edit-label').showModal(); document.getElementById('edit-label-id').value = '{{ label.identifier }}'; document.getElementById('edit-label-name').value = '{{ label.name }}'; document.getElementById('edit-label-colour').value = '{{ label.colour_hex }}';" style="background-color: {{ label.colour_hex }}">{{ label.name }}</span> 
        
            99
                                            </li> 
        
            100
                                        {% endfor %} 
        
            101
                                    </ul> 
        
            102
                                    <dialog id="add-label"> 
        
            103
                                        <article class="card"> 
        
            104
                                            <section class="card-main"> 
        
            105
                                                <form method="dialog" id="close-add-label"></form> 
        
            106
                                                <form method="POST" action="/{{ username }}/{{ repository }}/settings/add-label"> 
        
            107
                                                    <x-vbox> 
        
            108
                                                        <label> 
        
            109
                                                            {% trans %}Label name{% endtrans %} 
        
            110
                                                            <input type="text" name="label" required> 
        
            111
                                                            {% trans %}Label colour{% endtrans %} 
        
            112
                                                            <input type="color" name="colour" value="#009688"> 
        
            113
                                                        </label> 
        
            114
                                                        <x-buttonbox> 
        
            115
                                                            <button type="submit">{% trans %}Add label{% endtrans %}</button> 
        
            116
                                                            <button type="submit" form="close-add-label">{% trans %}Cancel{% endtrans %}</button> 
        
            117
                                                        </x-buttonbox> 
        
            118
                                                    </x-vbox> 
        
            119
                                                </form> 
        
            120
                                            </section> 
        
            121
                                        </article> 
        
            122
                                    </dialog> 
        
            123
                                    <button type="button" onclick="document.getElementById('add-label').showModal()">{% trans %}Add label{% endtrans %}</button> 
        
            124
                                    <button type="submit">{% trans %}Update{% endtrans %}</button> 
        
            125
                                </form> 
        
            126
                                {% if logged_in_user == username %} 
        
            127
                                    <form action="/{{ username }}/{{ repository }}/settings/delete" method="post" class="vbox"> 
        
            128
                                        <h2>{% trans %}Delete repository{% endtrans %}</h2> 
        
            129
                                        <p> 
        
            130
                                            {% trans %}Deleting a repository will permanently remove its git database, forum, settings and other associated data. THIS CANNOT BE UNDONE IN ANY WAY!{% endtrans %} 
        
            131
                                        </p> 
        
            132
                                        <label> 
        
            133
                                            {% trans %}Account password{% endtrans %} 
        
            134
                                            <input type="password" name="password" placeholder="{% trans %}Write your password to confirm deletion{% endtrans %}" required> 
        
            135
                                        </label> 
        
            136
                                        <button type="submit">{% trans %}Delete repository{% endtrans %}</button> 
        
            137
                                    </form> 
        
            138
                                {% endif %} 
        
            139
                            </section> 
        
            140
                        </article> 
        
            141
                    </x-vbox> 
        
            142
                </x-frame> 
        
            143
            </x-vbox> 
        
            144
            {% endblock %} 
        
            145