add draft page for empty link
This commit is contained in:
parent
398809b135
commit
d18237850c
|
@ -154,3 +154,17 @@ func SettingSSHKeys(form auth.AddSSHKeyForm, r render.Render, data base.TmplData
|
||||||
data["Keys"] = keys
|
data["Keys"] = keys
|
||||||
r.HTML(200, "user/publickey", data)
|
r.HTML(200, "user/publickey", data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func SettingNotification(r render.Render, data base.TmplData) {
|
||||||
|
// todo user setting notification
|
||||||
|
data["Title"] = "Notification"
|
||||||
|
data["PageIsUserSetting"] = true
|
||||||
|
r.HTML(200, "user/notification", data)
|
||||||
|
}
|
||||||
|
|
||||||
|
func SettingSecurity(r render.Render, data base.TmplData) {
|
||||||
|
// todo user setting security
|
||||||
|
data["Title"] = "Security"
|
||||||
|
data["PageIsUserSetting"] = true
|
||||||
|
r.HTML(200, "user/security", data)
|
||||||
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
{{range .Files}}
|
{{range .Files}}
|
||||||
<tr {{if .IsDir}}class="is-dir"{{end}}>
|
<tr {{if .IsDir}}class="is-dir"{{end}}>
|
||||||
<td class="name"><i class="fa fa-file"></i><a href="#">{{.Name}}</a></td>
|
<td class="name"><i class="fa {{if .IsDir}}fa-folder{{else}}fa-file{{end}}"></i><a href="#">{{.Name}}</a></td>
|
||||||
<td class="date"><time datetime="{{.Created}}" data-title="true" title="{{.Created}}">{{TimeSince .Created}}</time></td>
|
<td class="date"><time datetime="{{.Created}}" data-title="true" title="{{.Created}}">{{TimeSince .Created}}</time></td>
|
||||||
<td class="text">{{.Message}}</td>
|
<td class="text">{{.Message}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
{{template "base/head" .}}
|
||||||
|
{{template "base/navbar" .}}
|
||||||
|
<div id="gogs-body" class="container">
|
||||||
|
<div id="gogs-user-setting-nav" class="col-md-3">
|
||||||
|
<h4>Account Setting</h4>
|
||||||
|
<ul class="list-group">
|
||||||
|
<li class="list-group-item"><a href="/user/setting">Account Profile</a></li>
|
||||||
|
<li class="list-group-item"><a href="/user/setting/password">Password</a></li>
|
||||||
|
<li class="list-group-item list-group-item-success"><a href="/user/setting/notification">Notifications</a></li>
|
||||||
|
<li class="list-group-item"><a href="/user/setting/ssh/">SSH Keys</a></li>
|
||||||
|
<li class="list-group-item"><a href="/user/setting/security">Security</a></li>
|
||||||
|
<li class="list-group-item"><a href="/user/delete">Delete Account</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div id="gogs-user-setting-container" class="col-md-9">
|
||||||
|
<h4>Notification</h4>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{template "base/footer" .}}
|
|
@ -0,0 +1,19 @@
|
||||||
|
{{template "base/head" .}}
|
||||||
|
{{template "base/navbar" .}}
|
||||||
|
<div id="gogs-body" class="container">
|
||||||
|
<div id="gogs-user-setting-nav" class="col-md-3">
|
||||||
|
<h4>Account Setting</h4>
|
||||||
|
<ul class="list-group">
|
||||||
|
<li class="list-group-item"><a href="/user/setting">Account Profile</a></li>
|
||||||
|
<li class="list-group-item"><a href="/user/setting/password">Password</a></li>
|
||||||
|
<li class="list-group-item"><a href="/user/setting/notification">Notifications</a></li>
|
||||||
|
<li class="list-group-item"><a href="/user/setting/ssh/">SSH Keys</a></li>
|
||||||
|
<li class="list-group-item list-group-item-success"><a href="/user/setting/security">Security</a></li>
|
||||||
|
<li class="list-group-item"><a href="/user/delete">Delete Account</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div id="gogs-user-setting-container" class="col-md-9">
|
||||||
|
<h4>Security</h4>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{template "base/footer" .}}
|
2
web.go
2
web.go
|
@ -67,6 +67,8 @@ func runWeb(*cli.Context) {
|
||||||
m.Any("/user/setting", auth.SignInRequire(true), binding.BindIgnErr(auth.UpdateProfileForm{}), user.Setting)
|
m.Any("/user/setting", auth.SignInRequire(true), binding.BindIgnErr(auth.UpdateProfileForm{}), user.Setting)
|
||||||
m.Any("/user/setting/password", auth.SignInRequire(true), binding.BindIgnErr(auth.UpdatePasswdForm{}), user.SettingPassword)
|
m.Any("/user/setting/password", auth.SignInRequire(true), binding.BindIgnErr(auth.UpdatePasswdForm{}), user.SettingPassword)
|
||||||
m.Any("/user/setting/ssh", auth.SignInRequire(true), binding.BindIgnErr(auth.AddSSHKeyForm{}), user.SettingSSHKeys)
|
m.Any("/user/setting/ssh", auth.SignInRequire(true), binding.BindIgnErr(auth.AddSSHKeyForm{}), user.SettingSSHKeys)
|
||||||
|
m.Any("/user/setting/notification",auth.SignInRequire(true),user.SettingNotification)
|
||||||
|
m.Any("/user/setting/security",auth.SignInRequire(true),user.SettingSecurity)
|
||||||
|
|
||||||
m.Get("/user/:username", auth.SignInRequire(false), user.Profile)
|
m.Get("/user/:username", auth.SignInRequire(false), user.Profile)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue