summaryrefslogtreecommitdiffstats
path: root/templates/user/settings
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-07-26 00:24:27 -0400
committerUnknwon <joe2010xtmf@163.com>2014-07-26 00:24:27 -0400
commit8dd07c0ddd99ae626a1ec8c06f75f27fed51269f (patch)
tree261d3c9911dabc58c1ac54e4e36b3dee24d2032b /templates/user/settings
parent0a739cf9ac901f54484c34bba8322418dedb09b0 (diff)
downloadgitea-8dd07c0ddd99ae626a1ec8c06f75f27fed51269f.tar.gz
gitea-8dd07c0ddd99ae626a1ec8c06f75f27fed51269f.zip
New UI merge in progress
Diffstat (limited to 'templates/user/settings')
-rw-r--r--templates/user/settings/delete.tmpl28
-rw-r--r--templates/user/settings/nav.tmpl12
-rw-r--r--templates/user/settings/password.tmpl37
-rw-r--r--templates/user/settings/profile.tmpl50
-rw-r--r--templates/user/settings/social.tmpl18
-rw-r--r--templates/user/settings/sshkeys.tmpl61
6 files changed, 206 insertions, 0 deletions
diff --git a/templates/user/settings/delete.tmpl b/templates/user/settings/delete.tmpl
new file mode 100644
index 0000000000..9bfc287d8e
--- /dev/null
+++ b/templates/user/settings/delete.tmpl
@@ -0,0 +1,28 @@
+{{template "ng/base/head" .}}
+{{template "ng/base/header" .}}
+<div id="setting-wrapper" class="main-wrapper">
+ <div id="user-profile-setting" class="container clear">
+ {{template "user/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-warning panel-radius">
+ <p class="panel-header"><strong>{{.i18n.Tr "settings.delete_account"}}</strong></p>
+ <div class="panel-body panel-content">
+ <span class="alert alert-red alert-radius block"><i class="octicon octicon-alert"></i>{{.i18n.Tr "settings.delete_prompt" | Str2html}}</span>
+ <form action="/user/settings/delete" method="post">
+ {{.CsrfTokenHtml}}
+ <p class="field">
+ <span class="form-label"></span>
+ <button class="btn btn-red btn-large btn-radius" id="delete-account-button">{{.i18n.Tr "settings.confirm_delete_account"}}</button>
+ </p>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+{{template "ng/base/footer" .}} \ No newline at end of file
diff --git a/templates/user/settings/nav.tmpl b/templates/user/settings/nav.tmpl
new file mode 100644
index 0000000000..d6d20dee96
--- /dev/null
+++ b/templates/user/settings/nav.tmpl
@@ -0,0 +1,12 @@
+<div id="setting-menu" class="grid-1-5 panel panel-radius left">
+ <p class="panel-header"><strong>{{.i18n.Tr "settings"}}</strong></p>
+ <div class="panel-body">
+ <ul class="menu menu-vertical switching-list grid-1-5 left">
+ <li {{if .PageIsSettingsProfile}}class="current"{{end}}><a href="/user/settings">{{.i18n.Tr "settings.profile"}}</a></li>
+ <li {{if .PageIsSettingsPassword}}class="current"{{end}}><a href="/user/settings/password">{{.i18n.Tr "settings.password"}}</a></li>
+ <li {{if .PageIsSettingsSSHKeys}}class="current"{{end}}><a href="/user/settings/ssh">{{.i18n.Tr "settings.ssh_keys"}}</a></li>
+ <li {{if .PageIsSettingsSocial}}class="current"{{end}}><a href="/user/settings/social">{{.i18n.Tr "settings.social"}}</a></li>
+ <li {{if .PageIsSettingsDelete}}class="current"{{end}}><a href="/user/settings/delete">{{.i18n.Tr "settings.delete"}}</a></li>
+ </ul>
+ </div>
+</div> \ No newline at end of file
diff --git a/templates/user/settings/password.tmpl b/templates/user/settings/password.tmpl
new file mode 100644
index 0000000000..44e087af4e
--- /dev/null
+++ b/templates/user/settings/password.tmpl
@@ -0,0 +1,37 @@
+{{template "ng/base/head" .}}
+{{template "ng/base/header" .}}
+<div id="setting-wrapper" class="main-wrapper">
+ <div id="user-profile-setting" class="container clear">
+ {{template "user/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">
+ <p class="panel-header"><strong>{{.i18n.Tr "settings.change_password"}}</strong></p>
+ <form class="form form-align panel-body" id="user-profile-form" action="/user/settings/password" method="post">
+ {{.CsrfTokenHtml}}
+ <p class="field">
+ <label class="req" for="old-password">{{.i18n.Tr "settings.old_password"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_OldPassword}}ipt-error{{end}}" id="old-password" name="old_password" type="password" required />
+ </p>
+ <p class="field">
+ <label class="req" for="password">{{.i18n.Tr "settings.new_password"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_Password}}ipt-error{{end}}" id="password" name="password" type="password" required />
+ </p>
+ <p class="field">
+ <label class="req" for="retype">{{.i18n.Tr "re_type"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_Retype}}ipt-error{{end}}" id="retype" name="retype" type="password" required />
+ </p>
+ <p class="field">
+ <span class="form-label"></span>
+ <button class="btn btn-green btn-large btn-radius">{{.i18n.Tr "settings.change_password"}}</button>
+ </p>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+{{template "ng/base/footer" .}} \ No newline at end of file
diff --git a/templates/user/settings/profile.tmpl b/templates/user/settings/profile.tmpl
new file mode 100644
index 0000000000..2d09975f4d
--- /dev/null
+++ b/templates/user/settings/profile.tmpl
@@ -0,0 +1,50 @@
+{{template "ng/base/head" .}}
+{{template "ng/base/header" .}}
+<div id="setting-wrapper" class="main-wrapper">
+ <div id="user-profile-setting" class="container clear">
+ {{template "user/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">
+ <p class="panel-header"><strong>{{.i18n.Tr "settings.public_profile"}}</strong></p>
+ <form class="form form-align panel-body" id="user-profile-form" action="/user/settings" method="post">
+ {{.CsrfTokenHtml}}
+ <p class="text-center panel-desc">{{.i18n.Tr "settings.profile_desc"}}</p>
+ <p class="field">
+ <label class="req" for="username">{{.i18n.Tr "username"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_UserName}}ipt-error{{end}}" id="username" name="uname" type="text" value="{{.SignedUser.Name}}" data-uname="{{.SignedUser.Name}}" required />
+ </p>
+ <p class="field">
+ <label for="full-name">{{.i18n.Tr "settings.full_name"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_FullName}}ipt-error{{end}}" id="full-name" name="fullname" type="text" value="{{.SignedUser.FullName}}" />
+ </p>
+ <p class="field">
+ <label class="req" for="email">{{.i18n.Tr "email"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_Email}}ipt-error{{end}}" id="email" name="email" type="email" value="{{.SignedUser.Email}}" required />
+ </p>
+ <p class="field">
+ <label for="website">{{.i18n.Tr "settings.website"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_Website}}ipt-error{{end}}" id="website" name="website" type="url" value="{{.SignedUser.Website}}" />
+ </p>
+ <p class="field">
+ <label for="location">{{.i18n.Tr "settings.location"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_Location}}ipt-error{{end}}" id="location" name="location" type="text" value="{{.SignedUser.Location}}" />
+ </p>
+ <p class="field">
+ <label for="gravatar-email">Gravatar {{.i18n.Tr "email"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_Avatar}}ipt-error{{end}}" id="gravatar-email" name="avatar" type="text" value="{{.SignedUser.AvatarEmail}}" />
+ </p>
+ <p class="field">
+ <span class="form-label"></span>
+ <button class="btn btn-green btn-large btn-radius">{{.i18n.Tr "settings.update_profile"}}</button>
+ </p>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+{{template "ng/base/footer" .}} \ No newline at end of file
diff --git a/templates/user/settings/social.tmpl b/templates/user/settings/social.tmpl
new file mode 100644
index 0000000000..7ff2ea237f
--- /dev/null
+++ b/templates/user/settings/social.tmpl
@@ -0,0 +1,18 @@
+{{template "ng/base/head" .}}
+{{template "ng/base/header" .}}
+<div id="setting-wrapper" class="main-wrapper">
+ <div id="user-profile-setting" class="container clear">
+ {{template "user/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">
+ <p class="panel-header"><strong>{{.i18n.Tr "settings.manage_social"}}</strong></p>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+{{template "ng/base/footer" .}} \ No newline at end of file
diff --git a/templates/user/settings/sshkeys.tmpl b/templates/user/settings/sshkeys.tmpl
new file mode 100644
index 0000000000..43dfb66e26
--- /dev/null
+++ b/templates/user/settings/sshkeys.tmpl
@@ -0,0 +1,61 @@
+{{template "ng/base/head" .}}
+{{template "ng/base/header" .}}
+<div id="setting-wrapper" class="main-wrapper">
+ <div id="user-profile-setting" class="container clear">
+ {{template "user/settings/nav" .}}
+ <div class="grid-4-5 left">
+ <div class="setting-content">
+ {{template "ng/base/alert" .}}
+ <div id="user-ssh-setting-content">
+ <div id="user-ssh-panel" class="panel panel-radius">
+ <p class="panel-header">
+ <button class="btn btn-small btn-black btn-radius right" id="ssh-add">{{.i18n.Tr "settings.add_key"}}</button>
+ <strong>{{.i18n.Tr "settings.manage_ssh_keys"}}</strong>
+ </p>
+ <ul class="panel-body menu menu-vertical switching-list">
+ <li>{{.i18n.Tr "settings.ssh_desc"}}</li>
+ {{range .Keys}}
+ <li class="ssh clear">
+ <span class="active-icon left label {{if .HasRecentActivity}}label-green{{end}} label-radius"></span>
+ <i class="mega-octicon octicon-key left"></i>
+ <div class="ssh-content left">
+ <p><strong>{{.Name}}</strong></p>
+ <p class="print">{{.Fingerprint}}</p>
+ <p class="activity"><i>{{$.i18n.Tr "settings.add_on"}} {{DateFormat .Created "M d, Y"}} — <i class="octicon octicon-info"></i>{{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} {{DateFormat .Updated "M d, Y"}}{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}}</i></p>
+ </div>
+ <form action="/user/settings/ssh" method="post">
+ {{$.CsrfTokenHtml}}
+ <input name="_method" type="hidden" value="DELETE">
+ <input name="id" type="hidden" value="{{.Id}}">
+ <button class="right ssh-delete-btn btn btn-red btn-radius btn-small">{{$.i18n.Tr "settings.delete_key"}}</button>
+ </form>
+ </li>
+ {{end}}
+ </ul>
+ </div>
+ <p>{{.i18n.Tr "settings.ssh_helper" | Str2html}}</p>
+ <br>
+ <form class="panel panel-radius form form-align hide" id="user-ssh-add-form" action="/user/settings/ssh" method="post">
+ {{.CsrfTokenHtml}}
+ <p class="panel-header"><strong>{{.i18n.Tr "settings.add_new_key"}}</strong></p>
+ <div class="panel-body">
+ <p class="field">
+ <label class="req" for="ssh-title">{{.i18n.Tr "settings.key_name"}}</label>
+ <input class="ipt ipt-radius" id="ssh-title" name="title" type="text" required />
+ </p>
+ <p class="field clear">
+ <label class="left req" for="ssh-key">{{.i18n.Tr "settings.key_content"}}</label>
+ <textarea class="ipt ipt-radius left" name="content" id="ssh-key" required></textarea>
+ </p>
+ <p class="field">
+ <label></label>
+ <button class="btn btn-green btn-radius" id="ssh-add-btn">{{.i18n.Tr "settings.add_key"}}</button>
+ </p>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+{{template "ng/base/footer" .}} \ No newline at end of file