1
0
Fork 0

add draft page for empty link

This commit is contained in:
FuXiaoHei 2014-03-14 17:12:28 +08:00
parent 398809b135
commit d18237850c
5 changed files with 55 additions and 1 deletions

View file

@ -154,3 +154,17 @@ func SettingSSHKeys(form auth.AddSSHKeyForm, r render.Render, data base.TmplData
data["Keys"] = keys
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)
}

View file

@ -30,7 +30,7 @@
<tbody>
{{range .Files}}
<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="text">{{.Message}}</td>
</tr>

View file

@ -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" .}}

View file

@ -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
View file

@ -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/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/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)