summaryrefslogtreecommitdiffstats
path: root/templates/user/settings
diff options
context:
space:
mode:
authorAdam Strzelecki <ono@java.pl>2015-12-07 23:30:52 +0100
committerAdam Strzelecki <ono@java.pl>2015-12-08 00:57:46 +0100
commitda2585c11e11023ffa7a8c69d21c6fecac520a8e (patch)
tree1c2a575dfc00e0e78f47c497a6d9347b3edeca9a /templates/user/settings
parentdd8a06a397e26c46639eba1313102560dfa49c95 (diff)
downloadgitea-da2585c11e11023ffa7a8c69d21c6fecac520a8e.tar.gz
gitea-da2585c11e11023ffa7a8c69d21c6fecac520a8e.zip
Indent all templates with tabs
This commit improves templates readability, since all of them use consistent indent with all template command blocks indented too. 1. Indents both HTML containers such as <div>, <p> and Go HTML template blocks such as {{if}} {{with}} 2. Cleans all trailing white-space 3. Adds trailing last line-break to each file
Diffstat (limited to 'templates/user/settings')
-rw-r--r--templates/user/settings/applications.tmpl158
-rw-r--r--templates/user/settings/delete.tmpl72
-rw-r--r--templates/user/settings/email.tmpl128
-rw-r--r--templates/user/settings/navbar.tmpl36
-rw-r--r--templates/user/settings/password.tmpl64
-rw-r--r--templates/user/settings/profile.tmpl126
-rw-r--r--templates/user/settings/sshkeys.tmpl154
7 files changed, 369 insertions, 369 deletions
diff --git a/templates/user/settings/applications.tmpl b/templates/user/settings/applications.tmpl
index 37de6d151f..b5bacf7765 100644
--- a/templates/user/settings/applications.tmpl
+++ b/templates/user/settings/applications.tmpl
@@ -1,85 +1,85 @@
{{template "base/head" .}}
<div class="user settings">
- <div class="ui container">
- <div class="ui grid">
- {{template "user/settings/navbar" .}}
- <div class="twelve wide column content">
- {{template "base/alert" .}}
- <h4 class="ui top attached header">
- {{.i18n.Tr "settings.manage_access_token"}}
- <div class="ui right">
- <div class="ui blue tiny show-panel button" data-panel="#add-access-token-panel">{{.i18n.Tr "settings.generate_new_token"}}</div>
- </div>
- </h4>
- <div class="ui attached segment">
- <div class="ui key list">
- <div class="item">
- {{.i18n.Tr "settings.tokens_desc"}}
- </div>
- {{range .Tokens}}
- <div class="item ui grid">
- <div class="one wide column">
- <i class="ssh-key-state-indicator fa fa-circle{{if .HasRecentActivity}} active invert poping up{{else}}-o{{end}}" {{if .HasRecentActivity}}data-content="{{$.i18n.Tr "settings.token_state_desc"}}" data-variation="inverted tiny"{{end}}></i>
- </div>
- <div class="one wide column">
- <i class="fa fa-send fa-2x left"></i>
- </div>
- <div class="eleven wide column">
- <strong>{{.Name}}</strong>
- <div class="activity meta">
- <i>{{$.i18n.Tr "settings.add_on"}} <span>{{DateFmtShort .Created}}</span> — <i class="octicon octicon-info"></i> {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} <span>{{DateFmtShort .Updated}}</span>{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}}</i>
- </div>
- </div>
- <div class="two wide column">
- <button class="ui red tiny button delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
- {{$.i18n.Tr "settings.delete_token"}}
- </button>
- </div>
- </div>
- {{end}}
- </div>
- </div>
- <br>
- <div {{if not .HasError}}class="hide"{{end}} id="add-access-token-panel">
- <h4 class="ui top attached header">
- {{.i18n.Tr "settings.generate_new_token"}}
- </h4>
- <div class="ui attached segment">
- <form class="ui form" action="{{.Link}}" method="post">
- {{.CsrfTokenHtml}}
- <p>{{.i18n.Tr "settings.new_token_desc"}}</p>
- <div class="field {{if .Err_Name}}error{{end}}">
- <label for="name">{{.i18n.Tr "settings.token_name"}}</label>
- <input id="name" name="name" value="{{.name}}" autofocus required>
- </div>
- <button class="ui green button">
- {{.i18n.Tr "settings.generate_token"}}
- </button>
- </form>
- </div>
- </div>
- </div>
- </div>
- </div>
+ <div class="ui container">
+ <div class="ui grid">
+ {{template "user/settings/navbar" .}}
+ <div class="twelve wide column content">
+ {{template "base/alert" .}}
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "settings.manage_access_token"}}
+ <div class="ui right">
+ <div class="ui blue tiny show-panel button" data-panel="#add-access-token-panel">{{.i18n.Tr "settings.generate_new_token"}}</div>
+ </div>
+ </h4>
+ <div class="ui attached segment">
+ <div class="ui key list">
+ <div class="item">
+ {{.i18n.Tr "settings.tokens_desc"}}
+ </div>
+ {{range .Tokens}}
+ <div class="item ui grid">
+ <div class="one wide column">
+ <i class="ssh-key-state-indicator fa fa-circle{{if .HasRecentActivity}} active invert poping up{{else}}-o{{end}}" {{if .HasRecentActivity}}data-content="{{$.i18n.Tr "settings.token_state_desc"}}" data-variation="inverted tiny"{{end}}></i>
+ </div>
+ <div class="one wide column">
+ <i class="fa fa-send fa-2x left"></i>
+ </div>
+ <div class="eleven wide column">
+ <strong>{{.Name}}</strong>
+ <div class="activity meta">
+ <i>{{$.i18n.Tr "settings.add_on"}} <span>{{DateFmtShort .Created}}</span> — <i class="octicon octicon-info"></i> {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} <span>{{DateFmtShort .Updated}}</span>{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}}</i>
+ </div>
+ </div>
+ <div class="two wide column">
+ <button class="ui red tiny button delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
+ {{$.i18n.Tr "settings.delete_token"}}
+ </button>
+ </div>
+ </div>
+ {{end}}
+ </div>
+ </div>
+ <br>
+ <div {{if not .HasError}}class="hide"{{end}} id="add-access-token-panel">
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "settings.generate_new_token"}}
+ </h4>
+ <div class="ui attached segment">
+ <form class="ui form" action="{{.Link}}" method="post">
+ {{.CsrfTokenHtml}}
+ <p>{{.i18n.Tr "settings.new_token_desc"}}</p>
+ <div class="field {{if .Err_Name}}error{{end}}">
+ <label for="name">{{.i18n.Tr "settings.token_name"}}</label>
+ <input id="name" name="name" value="{{.name}}" autofocus required>
+ </div>
+ <button class="ui green button">
+ {{.i18n.Tr "settings.generate_token"}}
+ </button>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
</div>
<div class="ui small basic delete modal">
- <div class="ui icon header">
- <i class="trash icon"></i>
- {{.i18n.Tr "settings.access_token_deletion"}}
- </div>
- <div class="content">
- <p>{{.i18n.Tr "settings.access_token_deletion_desc"}}</p>
- </div>
- <div class="actions">
- <div class="ui red basic inverted cancel button">
- <i class="remove icon"></i>
- {{.i18n.Tr "modal.no"}}
- </div>
- <div class="ui green basic inverted ok button">
- <i class="checkmark icon"></i>
- {{.i18n.Tr "modal.yes"}}
- </div>
- </div>
+ <div class="ui icon header">
+ <i class="trash icon"></i>
+ {{.i18n.Tr "settings.access_token_deletion"}}
+ </div>
+ <div class="content">
+ <p>{{.i18n.Tr "settings.access_token_deletion_desc"}}</p>
+ </div>
+ <div class="actions">
+ <div class="ui red basic inverted cancel button">
+ <i class="remove icon"></i>
+ {{.i18n.Tr "modal.no"}}
+ </div>
+ <div class="ui green basic inverted ok button">
+ <i class="checkmark icon"></i>
+ {{.i18n.Tr "modal.yes"}}
+ </div>
+ </div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/user/settings/delete.tmpl b/templates/user/settings/delete.tmpl
index 6b490ad291..b95eb2105f 100644
--- a/templates/user/settings/delete.tmpl
+++ b/templates/user/settings/delete.tmpl
@@ -1,42 +1,42 @@
{{template "base/head" .}}
<div class="user settings delete">
- <div class="ui container">
- <div class="ui grid">
- {{template "user/settings/navbar" .}}
- <div class="twelve wide column content">
- {{template "base/alert" .}}
- <h4 class="ui top attached warning header">
- {{.i18n.Tr "settings.delete_account"}}
- </h4>
- <div class="ui attached warning segment">
- <div class="ui red message">
- <p class="text left"><i class="octicon octicon-alert"></i> {{.i18n.Tr "settings.delete_prompt" | Str2html}}</p>
- </div>
- <form class="ui form" id="delete-form" action="{{.Link}}" method="post">
- {{.CsrfTokenHtml}}
- <input class="fake" type="password">
- <div class="inline required field {{if .Err_Password}}error{{end}}">
- <label for="password">{{.i18n.Tr "password"}}</label>
- <input id="password" name="password" type="password" autofocus required>
- </div>
- <div class="ui red button delete-button" data-type="form" data-form="#delete-form">
- {{.i18n.Tr "settings.confirm_delete_account"}}
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
+ <div class="ui container">
+ <div class="ui grid">
+ {{template "user/settings/navbar" .}}
+ <div class="twelve wide column content">
+ {{template "base/alert" .}}
+ <h4 class="ui top attached warning header">
+ {{.i18n.Tr "settings.delete_account"}}
+ </h4>
+ <div class="ui attached warning segment">
+ <div class="ui red message">
+ <p class="text left"><i class="octicon octicon-alert"></i> {{.i18n.Tr "settings.delete_prompt" | Str2html}}</p>
+ </div>
+ <form class="ui form" id="delete-form" action="{{.Link}}" method="post">
+ {{.CsrfTokenHtml}}
+ <input class="fake" type="password">
+ <div class="inline required field {{if .Err_Password}}error{{end}}">
+ <label for="password">{{.i18n.Tr "password"}}</label>
+ <input id="password" name="password" type="password" autofocus required>
+ </div>
+ <div class="ui red button delete-button" data-type="form" data-form="#delete-form">
+ {{.i18n.Tr "settings.confirm_delete_account"}}
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
</div>
<div class="ui small basic delete modal">
- <div class="ui icon header">
- <i class="trash icon"></i>
- {{.i18n.Tr "settings.delete_account_title"}}
- </div>
- <div class="content">
- <p>{{.i18n.Tr "settings.delete_account_desc"}}</p>
- </div>
- {{template "base/delete_modal_actions" .}}
+ <div class="ui icon header">
+ <i class="trash icon"></i>
+ {{.i18n.Tr "settings.delete_account_title"}}
+ </div>
+ <div class="content">
+ <p>{{.i18n.Tr "settings.delete_account_desc"}}</p>
+ </div>
+ {{template "base/delete_modal_actions" .}}
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/user/settings/email.tmpl b/templates/user/settings/email.tmpl
index a9667dde91..558145302f 100644
--- a/templates/user/settings/email.tmpl
+++ b/templates/user/settings/email.tmpl
@@ -1,70 +1,70 @@
{{template "base/head" .}}
<div class="user settings emails">
- <div class="ui container">
- <div class="ui grid">
- {{template "user/settings/navbar" .}}
- <div class="twelve wide column content">
- {{template "base/alert" .}}
- <h4 class="ui top attached header">
- {{.i18n.Tr "settings.manage_emails"}}
- </h4>
- <div class="ui attached segment">
- <div class="ui email list">
- <div class="item">
- {{.i18n.Tr "settings.email_desc"}}
- </div>
- {{range .Emails}}
- <div class="item ui grid">
- <div class="column">
- <strong>{{.Email}}</strong>
- {{if .IsPrimary}}<span class="text red">{{$.i18n.Tr "settings.primary"}}</span>{{end}}
- {{if not .IsPrimary}}
- <div class="ui right">
- <button class="ui red tiny button delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
- {{$.i18n.Tr "settings.delete_key"}}
- </button>
- </div>
- {{if .IsActivated}}
- <div class="ui right">
- <form action="{{$.Link}}" method="post">
- {{$.CsrfTokenHtml}}
- <input name="_method" type="hidden" value="PRIMARY">
- <input name="id" type="hidden" value="{{.ID}}">
- <button class="ui green tiny button">{{$.i18n.Tr "settings.primary_email"}}</button>
- </form>
- </div>
- {{end}}
- {{end}}
- </div>
- </div>
- {{end}}
- </div>
- </div>
- <div class="ui attached bottom segment">
- <form class="ui form" action="{{.Link}}" method="post">
- {{.CsrfTokenHtml}}
- <div class="required field {{if .Err_Email}}error{{end}}">
- <label for="email">{{.i18n.Tr "settings.add_new_email"}}</label>
- <input id="email" name="email" type="email" autofocus required>
- </div>
- <button class="ui green button">
- {{.i18n.Tr "settings.add_email"}}
- </button>
- </form>
- </div>
- </div>
- </div>
- </div>
+ <div class="ui container">
+ <div class="ui grid">
+ {{template "user/settings/navbar" .}}
+ <div class="twelve wide column content">
+ {{template "base/alert" .}}
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "settings.manage_emails"}}
+ </h4>
+ <div class="ui attached segment">
+ <div class="ui email list">
+ <div class="item">
+ {{.i18n.Tr "settings.email_desc"}}
+ </div>
+ {{range .Emails}}
+ <div class="item ui grid">
+ <div class="column">
+ <strong>{{.Email}}</strong>
+ {{if .IsPrimary}}<span class="text red">{{$.i18n.Tr "settings.primary"}}</span>{{end}}
+ {{if not .IsPrimary}}
+ <div class="ui right">
+ <button class="ui red tiny button delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
+ {{$.i18n.Tr "settings.delete_key"}}
+ </button>
+ </div>
+ {{if .IsActivated}}
+ <div class="ui right">
+ <form action="{{$.Link}}" method="post">
+ {{$.CsrfTokenHtml}}
+ <input name="_method" type="hidden" value="PRIMARY">
+ <input name="id" type="hidden" value="{{.ID}}">
+ <button class="ui green tiny button">{{$.i18n.Tr "settings.primary_email"}}</button>
+ </form>
+ </div>
+ {{end}}
+ {{end}}
+ </div>
+ </div>
+ {{end}}
+ </div>
+ </div>
+ <div class="ui attached bottom segment">
+ <form class="ui form" action="{{.Link}}" method="post">
+ {{.CsrfTokenHtml}}
+ <div class="required field {{if .Err_Email}}error{{end}}">
+ <label for="email">{{.i18n.Tr "settings.add_new_email"}}</label>
+ <input id="email" name="email" type="email" autofocus required>
+ </div>
+ <button class="ui green button">
+ {{.i18n.Tr "settings.add_email"}}
+ </button>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
</div>
<div class="ui small basic delete modal">
- <div class="ui icon header">
- <i class="trash icon"></i>
- {{.i18n.Tr "settings.email_deletion"}}
- </div>
- <div class="content">
- <p>{{.i18n.Tr "settings.email_deletion_desc"}}</p>
- </div>
- {{template "base/delete_modal_actions" .}}
+ <div class="ui icon header">
+ <i class="trash icon"></i>
+ {{.i18n.Tr "settings.email_deletion"}}
+ </div>
+ <div class="content">
+ <p>{{.i18n.Tr "settings.email_deletion_desc"}}</p>
+ </div>
+ {{template "base/delete_modal_actions" .}}
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/user/settings/navbar.tmpl b/templates/user/settings/navbar.tmpl
index 5c8773a84b..87e24522b4 100644
--- a/templates/user/settings/navbar.tmpl
+++ b/templates/user/settings/navbar.tmpl
@@ -1,23 +1,23 @@
<div class="four wide column">
<div class="ui vertical menu">
<div class="header item">{{.i18n.Tr "settings"}}</div>
- <a class="{{if .PageIsSettingsProfile}}active{{end}} item" href="{{AppSubUrl}}/user/settings">
- {{.i18n.Tr "settings.profile"}}
- </a>
- <a class="{{if .PageIsSettingsPassword}}active{{end}} item" href="{{AppSubUrl}}/user/settings/password">
- {{.i18n.Tr "settings.password"}}
- </a>
- <a class="{{if .PageIsSettingsEmails}}active{{end}} item" href="{{AppSubUrl}}/user/settings/email">
- {{.i18n.Tr "settings.emails"}}
- </a>
- <a class="{{if .PageIsSettingsSSHKeys}}active{{end}} item" href="{{AppSubUrl}}/user/settings/ssh">
- {{.i18n.Tr "settings.ssh_keys"}}
- </a>
- <a class="{{if .PageIsSettingsApplications}}active{{end}} item" href="{{AppSubUrl}}/user/settings/applications">
- {{.i18n.Tr "settings.applications"}}
- </a>
- <a class="{{if .PageIsSettingsDelete}}active{{end}} item" href="{{AppSubUrl}}/user/settings/delete">
- {{.i18n.Tr "settings.delete"}}
- </a>
+ <a class="{{if .PageIsSettingsProfile}}active{{end}} item" href="{{AppSubUrl}}/user/settings">
+ {{.i18n.Tr "settings.profile"}}
+ </a>
+ <a class="{{if .PageIsSettingsPassword}}active{{end}} item" href="{{AppSubUrl}}/user/settings/password">
+ {{.i18n.Tr "settings.password"}}
+ </a>
+ <a class="{{if .PageIsSettingsEmails}}active{{end}} item" href="{{AppSubUrl}}/user/settings/email">
+ {{.i18n.Tr "settings.emails"}}
+ </a>
+ <a class="{{if .PageIsSettingsSSHKeys}}active{{end}} item" href="{{AppSubUrl}}/user/settings/ssh">
+ {{.i18n.Tr "settings.ssh_keys"}}
+ </a>
+ <a class="{{if .PageIsSettingsApplications}}active{{end}} item" href="{{AppSubUrl}}/user/settings/applications">
+ {{.i18n.Tr "settings.applications"}}
+ </a>
+ <a class="{{if .PageIsSettingsDelete}}active{{end}} item" href="{{AppSubUrl}}/user/settings/delete">
+ {{.i18n.Tr "settings.delete"}}
+ </a>
</div>
</div>
diff --git a/templates/user/settings/password.tmpl b/templates/user/settings/password.tmpl
index d56952b19f..e29e807e96 100644
--- a/templates/user/settings/password.tmpl
+++ b/templates/user/settings/password.tmpl
@@ -1,36 +1,36 @@
{{template "base/head" .}}
<div class="user settings password">
- <div class="ui container">
- <div class="ui grid">
- {{template "user/settings/navbar" .}}
- <div class="twelve wide column content">
- {{template "base/alert" .}}
- <h4 class="ui top attached header">
- {{.i18n.Tr "settings.change_password"}}
- </h4>
- <div class="ui attached segment">
- <form class="ui form" action="{{.Link}}" method="post">
- {{.CsrfTokenHtml}}
- <div class="required field {{if .Err_OldPassword}}error{{end}}">
- <label for="old_password">{{.i18n.Tr "settings.old_password"}}</label>
- <input id="old_password" name="old_password" type="password" autofocus required>
- </div>
- <div class="required field {{if .Err_Password}}error{{end}}">
- <label for="password">{{.i18n.Tr "settings.new_password"}}</label>
- <input id="password" name="password" type="password" required>
- </div>
- <div class="required field {{if .Err_Password}}error{{end}}">
- <label for="retype">{{.i18n.Tr "settings.retype_new_password"}}</label>
- <input id="retype" name="retype" type="password" required>
- </div>
+ <div class="ui container">
+ <div class="ui grid">
+ {{template "user/settings/navbar" .}}
+ <div class="twelve wide column content">
+ {{template "base/alert" .}}
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "settings.change_password"}}
+ </h4>
+ <div class="ui attached segment">
+ <form class="ui form" action="{{.Link}}" method="post">
+ {{.CsrfTokenHtml}}
+ <div class="required field {{if .Err_OldPassword}}error{{end}}">
+ <label for="old_password">{{.i18n.Tr "settings.old_password"}}</label>
+ <input id="old_password" name="old_password" type="password" autofocus required>
+ </div>
+ <div class="required field {{if .Err_Password}}error{{end}}">
+ <label for="password">{{.i18n.Tr "settings.new_password"}}</label>
+ <input id="password" name="password" type="password" required>
+ </div>
+ <div class="required field {{if .Err_Password}}error{{end}}">
+ <label for="retype">{{.i18n.Tr "settings.retype_new_password"}}</label>
+ <input id="retype" name="retype" type="password" required>
+ </div>
- <div class="field">
- <button class="ui green button">{{$.i18n.Tr "settings.change_password"}}</button>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
+ <div class="field">
+ <button class="ui green button">{{$.i18n.Tr "settings.change_password"}}</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/user/settings/profile.tmpl b/templates/user/settings/profile.tmpl
index d9bf7af09a..37d5683671 100644
--- a/templates/user/settings/profile.tmpl
+++ b/templates/user/settings/profile.tmpl
@@ -1,70 +1,70 @@
{{template "base/head" .}}
<div class="user settings profile">
- <div class="ui container">
- <div class="ui grid">
- {{template "user/settings/navbar" .}}
- <div class="twelve wide column content">
- {{template "base/alert" .}}
- <h4 class="ui top attached header">
- {{.i18n.Tr "settings.public_profile"}}
- </h4>
- <div class="ui attached segment">
- <p>{{.i18n.Tr "settings.profile_desc"}}</p>
- <form class="ui form" action="{{.Link}}" method="post">
- {{.CsrfTokenHtml}}
- <div class="required field {{if .Err_Name}}error{{end}}">
- <label for="username">{{.i18n.Tr "username"}}<span class="text red hide" id="name-change-prompt"> {{.i18n.Tr "settings.change_username_prompt"}}</span></label>
- <input id="username" name="name" value="{{.SignedUser.Name}}" data-name="{{.SignedUser.Name}}" autofocus required>
- </div>
- <div class="field {{if .Err_FullName}}error{{end}}">
- <label for="full_name">{{.i18n.Tr "settings.full_name"}}</label>
- <input id="full_name" name="full_name" value="{{.SignedUser.FullName}}">
- </div>
- <div class="required field {{if .Err_Email}}error{{end}}">
- <label for="email">{{.i18n.Tr "email"}}</label>
- <input id="email" name="email" value="{{.SignedUser.Email}}">
- </div>
- <div class="field {{if .Err_Website}}error{{end}}">
- <label for="website">{{.i18n.Tr "settings.website"}}</label>
- <input id="website" name="website" type="url" value="{{.SignedUser.Website}}">
- </div>
- <div class="field">
- <label for="location">{{.i18n.Tr "settings.location"}}</label>
- <input id="location" name="location" value="{{.SignedUser.Location}}">
- </div>
- <div class="required field {{if or DisableGravatar .SignedUser.UseCustomAvatar}}hide{{end}} {{if .Err_Gravatar}}error{{end}}">
- <label for="gravatar">Gravatar {{.i18n.Tr "email"}}</label>
- <input id="gravatar" name="gravatar" value="{{.SignedUser.AvatarEmail}}" />
- </div>
+ <div class="ui container">
+ <div class="ui grid">
+ {{template "user/settings/navbar" .}}
+ <div class="twelve wide column content">
+ {{template "base/alert" .}}
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "settings.public_profile"}}
+ </h4>
+ <div class="ui attached segment">
+ <p>{{.i18n.Tr "settings.profile_desc"}}</p>
+ <form class="ui form" action="{{.Link}}" method="post">
+ {{.CsrfTokenHtml}}
+ <div class="required field {{if .Err_Name}}error{{end}}">
+ <label for="username">{{.i18n.Tr "username"}}<span class="text red hide" id="name-change-prompt"> {{.i18n.Tr "settings.change_username_prompt"}}</span></label>
+ <input id="username" name="name" value="{{.SignedUser.Name}}" data-name="{{.SignedUser.Name}}" autofocus required>
+ </div>
+ <div class="field {{if .Err_FullName}}error{{end}}">
+ <label for="full_name">{{.i18n.Tr "settings.full_name"}}</label>
+ <input id="full_name" name="full_name" value="{{.SignedUser.FullName}}">
+ </div>
+ <div class="required field {{if .Err_Email}}error{{end}}">
+ <label for="email">{{.i18n.Tr "email"}}</label>
+ <input id="email" name="email" value="{{.SignedUser.Email}}">
+ </div>
+ <div class="field {{if .Err_Website}}error{{end}}">
+ <label for="website">{{.i18n.Tr "settings.website"}}</label>
+ <input id="website" name="website" type="url" value="{{.SignedUser.Website}}">
+ </div>
+ <div class="field">
+ <label for="location">{{.i18n.Tr "settings.location"}}</label>
+ <input id="location" name="location" value="{{.SignedUser.Location}}">
+ </div>
+ <div class="required field {{if or DisableGravatar .SignedUser.UseCustomAvatar}}hide{{end}} {{if .Err_Gravatar}}error{{end}}">
+ <label for="gravatar">Gravatar {{.i18n.Tr "email"}}</label>
+ <input id="gravatar" name="gravatar" value="{{.SignedUser.AvatarEmail}}" />
+ </div>
- <div class="field">
- <button class="ui green button">{{$.i18n.Tr "settings.update_profile"}}</button>
- </div>
- </form>
+ <div class="field">
+ <button class="ui green button">{{$.i18n.Tr "settings.update_profile"}}</button>
+ </div>
+ </form>
- <div class="ui divider"></div>
+ <div class="ui divider"></div>
- <form class="ui form" action="{{.Link}}/avatar" method="post" enctype="multipart/form-data">
- {{.CsrfTokenHtml}}
- <div class="inline field">
- <label>{{.i18n.Tr "settings.enable_custom_avatar"}}</label>
- <div class="ui checkbox">
- <input name="enable" type="checkbox" {{if .SignedUser.UseCustomAvatar}}checked{{end}}>
- <label>{{.i18n.Tr "settings.enable_custom_avatar_helper"}}</label>
- </div>
- </div>
- <div class="inline field">
- <label for="avatar">{{.i18n.Tr "settings.choose_new_avatar"}}</label>
- <input name="avatar" type="file" >
- </div>
+ <form class="ui form" action="{{.Link}}/avatar" method="post" enctype="multipart/form-data">
+ {{.CsrfTokenHtml}}
+ <div class="inline field">
+ <label>{{.i18n.Tr "settings.enable_custom_avatar"}}</label>
+ <div class="ui checkbox">
+ <input name="enable" type="checkbox" {{if .SignedUser.UseCustomAvatar}}checked{{end}}>
+ <label>{{.i18n.Tr "settings.enable_custom_avatar_helper"}}</label>
+ </div>
+ </div>
+ <div class="inline field">
+ <label for="avatar">{{.i18n.Tr "settings.choose_new_avatar"}}</label>
+ <input name="avatar" type="file" >
+ </div>
- <div class="field">
- <button class="ui green button">{{$.i18n.Tr "settings.update_avatar"}}</button>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
+ <div class="field">
+ <button class="ui green button">{{$.i18n.Tr "settings.update_avatar"}}</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/user/settings/sshkeys.tmpl b/templates/user/settings/sshkeys.tmpl
index 4c2177278b..33426fdc56 100644
--- a/templates/user/settings/sshkeys.tmpl
+++ b/templates/user/settings/sshkeys.tmpl
@@ -1,83 +1,83 @@
{{template "base/head" .}}
<div class="user settings sshkeys">
- <div class="ui container">
- <div class="ui grid">
- {{template "user/settings/navbar" .}}
- <div class="twelve wide column content">
- {{template "base/alert" .}}
- <h4 class="ui top attached header">
- {{.i18n.Tr "settings.manage_ssh_keys"}}
- <div class="ui right">
- <div class="ui blue tiny show-panel button" data-panel="#add-ssh-key-panel">{{.i18n.Tr "settings.add_key"}}</div>
- </div>
- </h4>
- <div class="ui attached segment">
- <div class="ui key list">
- <div class="item">
- {{.i18n.Tr "settings.ssh_desc"}}
- </div>
- {{range .Keys}}
- <div class="item ui grid">
- <div class="one wide column">
- <i class="ssh-key-state-indicator fa fa-circle{{if .HasRecentActivity}} active invert poping up{{else}}-o{{end}}" {{if .HasRecentActivity}}data-content="{{$.i18n.Tr "settings.key_state_desc"}}" data-variation="inverted tiny"{{end}}></i>
- </div>
- <div class="one wide column">
- <i class="mega-octicon octicon-key left"></i>
- </div>
- <div class="eleven wide column">
- <strong>{{.Name}}</strong>
- <div class="print meta">
- {{.Fingerprint}}
- </div>
- <div class="activity meta">
- <i>{{$.i18n.Tr "settings.add_on"}} <span>{{DateFmtShort .Created}}</span> — <i class="octicon octicon-info"></i> {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} <span>{{DateFmtShort .Updated}}</span>{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}}</i>
- </div>
- </div>
- <div class="two wide column">
- <button class="ui red tiny button delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
- {{$.i18n.Tr "settings.delete_key"}}
- </button>
- </div>
- </div>
- {{end}}
- </div>
- </div>
- <br>
- <p>{{.i18n.Tr "settings.ssh_helper" "https://help.github.com/articles/generating-ssh-keys" "https://help.github.com/ssh-issues/" | Str2html}}</p>
- <div {{if not .HasError}}class="hide"{{end}} id="add-ssh-key-panel">
- <h4 class="ui top attached header">
- {{.i18n.Tr "settings.add_new_key"}}
- </h4>
- <div class="ui attached segment">
- <form class="ui form" action="{{.Link}}" method="post">
- {{.CsrfTokenHtml}}
- <div class="field {{if .Err_Title}}error{{end}}">
- <label for="title">{{.i18n.Tr "settings.key_name"}}</label>
- <input id="title" name="title" value="{{.title}}" autofocus required>
- </div>
- <div class="field {{if .Err_Content}}error{{end}}">
- <label for="content">{{.i18n.Tr "settings.key_content"}}</label>
- <textarea id="content" name="content" required>{{.content}}</textarea>
- </div>
- <button class="ui green button">
- {{.i18n.Tr "settings.add_key"}}
- </button>
- </form>
- </div>
- </div>
- </div>
- </div>
- </div>
+ <div class="ui container">
+ <div class="ui grid">
+ {{template "user/settings/navbar" .}}
+ <div class="twelve wide column content">
+ {{template "base/alert" .}}
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "settings.manage_ssh_keys"}}
+ <div class="ui right">
+ <div class="ui blue tiny show-panel button" data-panel="#add-ssh-key-panel">{{.i18n.Tr "settings.add_key"}}</div>
+ </div>
+ </h4>
+ <div class="ui attached segment">
+ <div class="ui key list">
+ <div class="item">
+ {{.i18n.Tr "settings.ssh_desc"}}
+ </div>
+ {{range .Keys}}
+ <div class="item ui grid">
+ <div class="one wide column">
+ <i class="ssh-key-state-indicator fa fa-circle{{if .HasRecentActivity}} active invert poping up{{else}}-o{{end}}" {{if .HasRecentActivity}}data-content="{{$.i18n.Tr "settings.key_state_desc"}}" data-variation="inverted tiny"{{end}}></i>
+ </div>
+ <div class="one wide column">
+ <i class="mega-octicon octicon-key left"></i>
+ </div>
+ <div class="eleven wide column">
+ <strong>{{.Name}}</strong>
+ <div class="print meta">
+ {{.Fingerprint}}
+ </div>
+ <div class="activity meta">
+ <i>{{$.i18n.Tr "settings.add_on"}} <span>{{DateFmtShort .Created}}</span> — <i class="octicon octicon-info"></i> {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} <span>{{DateFmtShort .Updated}}</span>{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}}</i>
+ </div>
+ </div>
+ <div class="two wide column">
+ <button class="ui red tiny button delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
+ {{$.i18n.Tr "settings.delete_key"}}
+ </button>
+ </div>
+ </div>
+ {{end}}
+ </div>
+ </div>
+ <br>
+ <p>{{.i18n.Tr "settings.ssh_helper" "https://help.github.com/articles/generating-ssh-keys" "https://help.github.com/ssh-issues/" | Str2html}}</p>
+ <div {{if not .HasError}}class="hide"{{end}} id="add-ssh-key-panel">
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "settings.add_new_key"}}
+ </h4>
+ <div class="ui attached segment">
+ <form class="ui form" action="{{.Link}}" method="post">
+ {{.CsrfTokenHtml}}
+ <div class="field {{if .Err_Title}}error{{end}}">
+ <label for="title">{{.i18n.Tr "settings.key_name"}}</label>
+ <input id="title" name="title" value="{{.title}}" autofocus required>
+ </div>
+ <div class="field {{if .Err_Content}}error{{end}}">
+ <label for="content">{{.i18n.Tr "settings.key_content"}}</label>
+ <textarea id="content" name="content" required>{{.content}}</textarea>
+ </div>
+ <button class="ui green button">
+ {{.i18n.Tr "settings.add_key"}}
+ </button>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
</div>
<div class="ui small basic delete modal">
- <div class="ui icon header">
- <i class="trash icon"></i>
- {{.i18n.Tr "settings.ssh_key_deletion"}}
- </div>
- <div class="content">
- <p>{{.i18n.Tr "settings.ssh_key_deletion_desc"}}</p>
- </div>
- {{template "base/delete_modal_actions" .}}
+ <div class="ui icon header">
+ <i class="trash icon"></i>
+ {{.i18n.Tr "settings.ssh_key_deletion"}}
+ </div>
+ <div class="content">
+ <p>{{.i18n.Tr "settings.ssh_key_deletion_desc"}}</p>
+ </div>
+ {{template "base/delete_modal_actions" .}}
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}