diff options
author | FuXiaoHei <fuxiaohei@hexiaz.com> | 2014-03-14 17:12:28 +0800 |
---|---|---|
committer | FuXiaoHei <fuxiaohei@hexiaz.com> | 2014-03-14 17:12:28 +0800 |
commit | d18237850c6a4ae855b3f8592994c91462fcdb0a (patch) | |
tree | d379828e1cd31ad6db2f02d8ff3d01b9045b39a4 | |
parent | 398809b135742ad8a7441f65fa7d0ccec318bd91 (diff) | |
download | gitea-d18237850c6a4ae855b3f8592994c91462fcdb0a.tar.gz gitea-d18237850c6a4ae855b3f8592994c91462fcdb0a.zip |
add draft page for empty link
-rw-r--r-- | routers/user/setting.go | 14 | ||||
-rw-r--r-- | templates/repo/single.tmpl | 2 | ||||
-rw-r--r-- | templates/user/notification.tmpl | 19 | ||||
-rw-r--r-- | templates/user/security.tmpl | 19 | ||||
-rw-r--r-- | web.go | 2 |
5 files changed, 55 insertions, 1 deletions
diff --git a/routers/user/setting.go b/routers/user/setting.go index b01d27d845..8b5a2d18df 100644 --- a/routers/user/setting.go +++ b/routers/user/setting.go @@ -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) +} diff --git a/templates/repo/single.tmpl b/templates/repo/single.tmpl index 4a71ad3465..fbd05c4ba7 100644 --- a/templates/repo/single.tmpl +++ b/templates/repo/single.tmpl @@ -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> diff --git a/templates/user/notification.tmpl b/templates/user/notification.tmpl new file mode 100644 index 0000000000..c1abc46fb0 --- /dev/null +++ b/templates/user/notification.tmpl @@ -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" .}}
\ No newline at end of file diff --git a/templates/user/security.tmpl b/templates/user/security.tmpl new file mode 100644 index 0000000000..37cd5872aa --- /dev/null +++ b/templates/user/security.tmpl @@ -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" .}}
\ No newline at end of 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) |