aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo/settings/options.tmpl
blob: ec0503e677559cf6d7331d3e2c36c8e055ba858b (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
{{template "ng/base/head" .}}
{{template "ng/base/header" .}}
<div id="repo-wrapper">
    {{template "repo/header" .}}
	<div id="setting-wrapper" class="main-wrapper">
	    <div id="repo-setting" class="container clear">
	        {{template "repo/settings/nav" .}}
	        <div class="grid-4-5 left">
	            <div class="setting-content">
	                {{template "ng/base/alert" .}}
	                <div id="setting-content">
	                    <div id="user-profile-setting-content" class="panel panel-radius">
	                        <div class="panel-header">
	                        	<strong>{{.i18n.Tr "repo.settings.basic_settings"}}</strong>
	                        </div>
	                        <form class="form form-align panel-body" id="repo-setting-form" action="{{.RepoLink}}/settings" method="post">
	                            {{.CsrfTokenHtml}}
                    			<input type="hidden" name="action" value="update">
	                            <div class="field">
	                                <label class="req" for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
	                                <input class="ipt ipt-large ipt-radius {{if .Err_RepoName}}ipt-error{{end}}" id="repo_name" name="repo_name" value="{{.Repository.Name}}" data-repo-name="{{.Repository.Name}}" required />
	                            </div>
					            <div class="field clear">
					                <label class="left" for="desc">{{.i18n.Tr "repo.repo_desc"}}</label>
					                <textarea class="ipt ipt-large ipt-radius {{if .Err_Description}}ipt-error{{end}}" id="desc" name="desc">{{.Repository.Description}}</textarea>
					            </div>
	                            <div class="field">
	                                <label for="website">{{.i18n.Tr "repo.settings.site"}}</label>
	                                <input class="ipt ipt-large ipt-radius {{if .Err_Website}}ipt-error{{end}}" id="website" name="site" type="url" value="{{.Repository.Website}}" />
	                            </div>
	                            <hr>	
	                            <br>
					            <div class="field">
					                <label for="lang">{{.i18n.Tr "repo.default_branch"}}</label>
					                <select id="lang" name="gitignore">
		                                {{if .Repository.DefaultBranch}}<option value="{{.Repository.DefaultBranch}}">{{.Repository.DefaultBranch}}</option>{{end}}
		                                {{range .Branches}}
		                                	{{if not (eq . $.Repository.DefaultBranch)}}<option value="{{.}}">{{.}}</option>{{end}}
		                                {{end}}
					                </select>
					            </div>
					            {{if .Repository.IsMirror}}
	                            <div class="field">
	                                <label for="interval">{{.i18n.Tr "repo.mirror_interval"}}</label>
	                                <input class="ipt ipt-large ipt-radius {{if .Err_Interval}}ipt-error{{end}}" id="interval" name="interval" type="number" value="{{.MirrorInterval}}" />
	                            </div>
	                            {{end}}
					            <div class="field">
					                <label for="visibility">{{.i18n.Tr "repo.visibility"}}</label>
					                <input class="ipt-chk" id="visibility" name="private" type="checkbox" {{if .Repository.IsPrivate}}checked{{end}} />
					                <span>{{.i18n.Tr "repo.visiblity_helper" | Str2html}}</span>
					            </div>
					            <div class="field">
					                <label for="goget">{{.i18n.Tr "repo.goget_meta"}}</label>
					                <input class="ipt-chk" id="goget" name="goget" type="checkbox" {{if .Repository.IsGoget}}checked{{end}} />
					                <span>{{.i18n.Tr "repo.goget_meta_helper" | Str2html}}</span>
					            </div>
	                            <div class="field">
	                                <span class="form-label"></span>
	                                <button class="btn btn-green btn-large btn-radius">{{.i18n.Tr "repo.settings.update_settings"}}</button>
	                            </div>
	                        </form>
	                    </div>
	                </div>
	            </div>
	            <br>
	            <div class="setting-content">
	                <div id="setting-content">
	                    <div id="user-profile-setting-content" class="panel panel-warning panel-radius">
	                        <div class="panel-header">
	                        	<strong>{{.i18n.Tr "repo.settings.danger_zone"}}</strong>
	                        </div>
	                        <div class="panel-body">
	                        	<div class="repo-setting-zone">
	                        	    <button class="btn btn-gray btn-large btn-radius right" id="transfer-button">{{.i18n.Tr "repo.settings.transfer"}}</button>
	                        	    <dt>{{.i18n.Tr "repo.settings.transfer"}}</dt>
	                        	    <dl>{{.i18n.Tr "repo.settings.transfer_desc"}}</dl>
	                        	    <div class="hide" id="transfer-form">
		                        	    <br>
									    <form class="form-align form panel container panel-radius" action="{{.RepoLink}}/settings" method="post">
									        {{.CsrfTokenHtml}}
	                    					<input type="hidden" name="action" value="transfer">
									        <div class="panel-content">
					                            <div class="field">
					                                <label class="req" for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
					                                <input class="ipt ipt-large ipt-radius" id="repo_name" name="repo_name" required />
					                            </div>
								                <label class="req" for="new_owner_name">{{.i18n.Tr "repo.settings.transfer_owner"}}</label>
								                <input class="ipt ipt-large ipt-radius" id="new_owner_name" name="new_owner_name" required/>
								                <span class="form-label"></span>
								                <button class="btn btn-large btn-red btn-radius right">{{.i18n.Tr "repo.settings.make_transfer"}}</button>
									        </div>
									    </form>
								    </div>
	                        	</div>
	                        	<hr>
	                        	<div class="repo-setting-zone">
	                        	    <button class="btn btn-gray btn-large btn-radius pull-right" id="delete-button">{{.i18n.Tr "repo.settings.delete"}}</button>
	                        	    <dt>{{.i18n.Tr "repo.settings.delete"}}</dt>
	                        	    <dl>{{.i18n.Tr "repo.settings.delete_desc"}}</dl>
	                        	    <div class="hide" id="delete-form">
		                        	    <br>
									    <form class="form-align form panel container panel-radius" action="{{.RepoLink}}/settings" method="post">
									        {{.CsrfTokenHtml}}
	                    					<input type="hidden" name="action" value="delete">
									        <div class="panel-content">
					                            <div class="field">
					                                <label class="req" for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
					                                <input class="ipt ipt-large ipt-radius" id="repo_name" name="repo_name" required />
					                            </div>
								                <label class="req" for="password">{{.i18n.Tr "password"}}</label>
								                <input class="ipt ipt-large ipt-radius" id="password" name="password" type="password" required/>
								                <span class="form-label"></span>
								                <button class="btn btn-large btn-red btn-radius right">{{.i18n.Tr "repo.settings.confirm_delete"}}</button>
									        </div>
									    </form>
								    </div>
	                        	</div>
	                        </div>
	                    </div>
	                </div>
	            </div>
	        </div>
	    </div>
    </div>
</div>
{{template "ng/base/footer" .}}