summaryrefslogtreecommitdiffstats
path: root/templates/repo/setting.tmpl
blob: a2fb1771d4416a2bbbe9c5032165d7d55f49e5d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{{template "base/head" .}}
{{template "base/navbar" .}}
{{template "repo/nav" .}}
{{template "repo/toolbar" .}}
<div id="gogs-body" class="container">
    <div id="gogs-user-setting-nav" class="col-md-3">
        <ul class="list-group" data-init="tabs">
            <li class="list-group-item active"><a href="/{{.Owner.Name}}/{{.Repository.Name}}/settings">Options</a></li>
            <!--<li class="list-group-item"><a href="#">Collaborators</a></li>
            <li class="list-group-item"><a href="#">Notifications</a></li>-->
        </ul>
    </div>

    <div id="gogs-repo-setting-container" class="col-md-9">
        {{if .ErrorMsg}}<p class="alert alert-danger">{{.ErrorMsg}}</p>{{end}}
        <div class="panel panel-default">
            <div class="panel-heading">
                Repository Options
            </div>

            <div class="panel-body">
                
            </div>
        </div>

        <div class="panel panel-warning">
            <div class="panel-heading">
                Danger Zone
            </div>
            
            <div class="panel-body">
                <button type="button" class="btn btn-default pull-right" href="#delete-repository-modal" data-toggle="modal">
                    Delete this repository
                </button>
                <dd>
                    <dt>Delete this repository.</dt>
                    <dl>Once you delete a repository, there is no going back. Please be certain.</dl>
                </dd>

                <div class="modal fade" id="delete-repository-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                    <div class="modal-dialog">
                        <form action="/{{.Owner.Name}}/{{.Repository.Name}}/settings" method="post" class="modal-content">
                            <input type="hidden" name="action" value="delete">

                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                                <h4 class="modal-title" id="myModalLabel">Delete repository</h4>
                            </div>

                            <div class="modal-body">
                                <div class="form-group">
                                    <label>Please enter your repository name "<strong class="text-danger">{{.Repository.Name}}</strong>"</label>
                                    <input name="repository" class="form-control" type="text" placeholder="Type your repository name" required="required">
                                </div>
                            </div>

                            <div class="modal-footer">
                                <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
                                <button class="btn btn-danger btn-lg">I understand the consequences, delete this repository</button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{{template "base/footer" .}}