Browse Source

Changed setting url to settings

for-closed-social
James Anderson 10 years ago
parent
commit
4b58c01603
4 changed files with 10 additions and 10 deletions
  1. +1
    -1
      templates/base/navbar.tmpl
  2. +1
    -1
      templates/user/setting.tmpl
  3. +5
    -5
      templates/user/setting_nav.tmpl
  4. +3
    -3
      web.go

+ 1
- 1
templates/base/navbar.tmpl View File

@ -21,7 +21,7 @@
<a id="nav-avatar" class="nav-item navbar-right{{if .PageIsUserProfile}} active{{end}}" href="{{.SignedUser.HomeLink}}" data-toggle="tooltip" data-placement="bottom" title="{{.SignedUserName}}"> <a id="nav-avatar" class="nav-item navbar-right{{if .PageIsUserProfile}} active{{end}}" href="{{.SignedUser.HomeLink}}" data-toggle="tooltip" data-placement="bottom" title="{{.SignedUserName}}">
<img src="{{.SignedUser.AvatarLink}}?s=28" alt="user-avatar" title="username"/> <img src="{{.SignedUser.AvatarLink}}?s=28" alt="user-avatar" title="username"/>
</a> </a>
<a class="navbar-right nav-item{{if .PageIsUserSetting}} active{{end}}" href="/user/setting" data-toggle="tooltip" data-placement="bottom" title="Setting"><i class="fa fa-cogs fa-lg"></i></a>
<a class="navbar-right nav-item{{if .PageIsUserSetting}} active{{end}}" href="/user/settings" data-toggle="tooltip" data-placement="bottom" title="Settings"><i class="fa fa-cogs fa-lg"></i></a>
{{if .IsAdmin}}<a class="navbar-right nav-item{{if .PageIsAdmin}} active{{end}}" href="/admin" data-toggle="tooltip" data-placement="bottom" title="Admin"><i class="fa fa-gear fa-lg"></i></a>{{end}} {{if .IsAdmin}}<a class="navbar-right nav-item{{if .PageIsAdmin}} active{{end}}" href="/admin" data-toggle="tooltip" data-placement="bottom" title="Admin"><i class="fa fa-gear fa-lg"></i></a>{{end}}
<div class="navbar-right nav-item pull-right{{if .PageIsNewRepo}} active{{end}}" id="nav-repo-new" data-toggle="tooltip" data-placement="bottom" title="New Repo"> <div class="navbar-right nav-item pull-right{{if .PageIsNewRepo}} active{{end}}" id="nav-repo-new" data-toggle="tooltip" data-placement="bottom" title="New Repo">
<button type="button" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-plus-square fa-lg"></i></button> <button type="button" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-plus-square fa-lg"></i></button>

+ 1
- 1
templates/user/setting.tmpl View File

@ -13,7 +13,7 @@
<label class="col-md-2 control-label" for="user-setting-username">Username<strong class="text-danger">*</strong></label> <label class="col-md-2 control-label" for="user-setting-username">Username<strong class="text-danger">*</strong></label>
<div class="col-md-8"> <div class="col-md-8">
<input name="username" class="form-control" placeholder="Type your user name" required="required" value="{{.SignedUser.Name}}" title="{{.SignedUser.Name}}" id="user-setting-username"> <input name="username" class="form-control" placeholder="Type your user name" required="required" value="{{.SignedUser.Name}}" title="{{.SignedUser.Name}}" id="user-setting-username">
<p class="help-block hidden"><span class="text-danger">Cautious : </span>your username is changing !</p>
<p class="help-block hidden"><span class="text-danger">Caution : </span>your username is changing !</p>
</div> </div>
</div> </div>

+ 5
- 5
templates/user/setting_nav.tmpl View File

@ -1,11 +1,11 @@
<div id="user-setting-nav" class="col-md-3"> <div id="user-setting-nav" class="col-md-3">
<h4>Account Setting</h4>
<h4>Account Settings</h4>
<ul class="list-group"> <ul class="list-group">
<li class="list-group-item{{if .IsUserPageSetting}} list-group-item-success{{end}}"><a href="/user/setting">Account Profile</a></li>
<li class="list-group-item{{if .IsUserPageSettingSocial}} list-group-item-success{{end}}"><a href="/user/setting/social">Social Account</a></li>
<li class="list-group-item{{if .IsUserPageSettingPasswd}} list-group-item-success{{end}}"><a href="/user/setting/password">Password</a></li>
<li class="list-group-item{{if .IsUserPageSetting}} list-group-item-success{{end}}"><a href="/user/settings">Account Profile</a></li>
<li class="list-group-item{{if .IsUserPageSettingSocial}} list-group-item-success{{end}}"><a href="/user/settings/social">Social Account</a></li>
<li class="list-group-item{{if .IsUserPageSettingPasswd}} list-group-item-success{{end}}"><a href="/user/settings/password">Password</a></li>
<!-- <li class="list-group-item{{if .IsUserPageSettingNotify}} list-group-item-success{{end}}"><a href="/user/setting/notification">Notifications</a></li> --> <!-- <li class="list-group-item{{if .IsUserPageSettingNotify}} list-group-item-success{{end}}"><a href="/user/setting/notification">Notifications</a></li> -->
<li class="list-group-item{{if .IsUserPageSettingSSH}} list-group-item-success{{end}}"><a href="/user/setting/ssh/">SSH Keys</a></li>
<li class="list-group-item{{if .IsUserPageSettingSSH}} list-group-item-success{{end}}"><a href="/user/settings/ssh/">SSH Keys</a></li>
<!-- <li class="list-group-item{{if .IsUserPageSettingSecurity}} list-group-item-success{{end}}"><a href="/user/setting/security">Security</a></li> --> <!-- <li class="list-group-item{{if .IsUserPageSettingSecurity}} list-group-item-success{{end}}"><a href="/user/setting/security">Security</a></li> -->
<li class="list-group-item{{if .IsUserPageSettingDelete}} list-group-item-success{{end}}"><a href="/user/delete">Delete Account</a></li> <li class="list-group-item{{if .IsUserPageSettingDelete}} list-group-item-success{{end}}"><a href="/user/delete">Delete Account</a></li>
</ul> </ul>

+ 3
- 3
web.go View File

@ -94,8 +94,8 @@ func runWeb(*cli.Context) {
m.Group("/user", func(r martini.Router) { m.Group("/user", func(r martini.Router) {
r.Get("/delete", user.Delete) r.Get("/delete", user.Delete)
r.Post("/delete", user.DeletePost) r.Post("/delete", user.DeletePost)
r.Get("/setting", user.Setting)
r.Post("/setting", bindIgnErr(auth.UpdateProfileForm{}), user.SettingPost)
r.Get("/settings", user.Setting)
r.Post("/settings", bindIgnErr(auth.UpdateProfileForm{}), user.SettingPost)
}, reqSignIn) }, reqSignIn)
m.Group("/user", func(r martini.Router) { m.Group("/user", func(r martini.Router) {
r.Get("/feeds", middleware.Bind(auth.FeedsForm{}), user.Feeds) r.Get("/feeds", middleware.Bind(auth.FeedsForm{}), user.Feeds)
@ -105,7 +105,7 @@ func runWeb(*cli.Context) {
r.Post("/forget_password", user.ForgotPasswdPost) r.Post("/forget_password", user.ForgotPasswdPost)
r.Get("/logout", user.SignOut) r.Get("/logout", user.SignOut)
}) })
m.Group("/user/setting", func(r martini.Router) {
m.Group("/user/settings", func(r martini.Router) {
r.Get("/social", user.SettingSocial) r.Get("/social", user.SettingSocial)
r.Get("/password", user.SettingPassword) r.Get("/password", user.SettingPassword)
r.Post("/password", bindIgnErr(auth.UpdatePasswdForm{}), user.SettingPasswordPost) r.Post("/password", bindIgnErr(auth.UpdatePasswdForm{}), user.SettingPasswordPost)

Loading…
Cancel
Save