summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-02-22 18:24:49 -0500
committerUnknwon <u@gogs.io>2015-02-22 18:24:49 -0500
commit04164eada3bc89bb3b54aa3dea0f22203ff4aa6e (patch)
tree8c66bfea48dc2f1fc9638c212477d26fb807a743 /templates
parent74a8bb93d84a75fae46cd40f2b670073bee5a593 (diff)
downloadgitea-04164eada3bc89bb3b54aa3dea0f22203ff4aa6e.tar.gz
gitea-04164eada3bc89bb3b54aa3dea0f22203ff4aa6e.zip
models: able to rename user with diff letter cases #981
- templates/org: mirror fix on name output - routers: add missing error check
Diffstat (limited to 'templates')
-rw-r--r--templates/org/base/header.tmpl2
-rw-r--r--templates/org/settings/nav.tmpl20
-rw-r--r--templates/org/settings/options.tmpl114
3 files changed, 68 insertions, 68 deletions
diff --git a/templates/org/base/header.tmpl b/templates/org/base/header.tmpl
index 1bbb092bf5..1649b92090 100644
--- a/templates/org/base/header.tmpl
+++ b/templates/org/base/header.tmpl
@@ -2,7 +2,7 @@
<div class="container">
<a class="text-black left" href="{{AppSubUrl}}/org/{{.Org.LowerName}}">
<img class="avatar-48 left" src="{{.Org.AvatarLink}}?s=100">
- <span class="org-name">{{.Org.FullName}}</span>
+ <span class="org-name">{{if .Org.FullName}}{{.Org.FullName}}{{else}}{{.Org.Name}}{{end}}</span>
</a>
<ul class="menu menu-line container">
<li class="right">
diff --git a/templates/org/settings/nav.tmpl b/templates/org/settings/nav.tmpl
index 11d32d7f67..1285c4ab94 100644
--- a/templates/org/settings/nav.tmpl
+++ b/templates/org/settings/nav.tmpl
@@ -1,12 +1,12 @@
<div id="setting-menu" class="grid-1-5 panel panel-radius left">
- <div class="panel-header">
- <strong>{{.i18n.Tr "org.settings"}}</strong>
- </div>
- <div class="panel-body">
- <ul class="menu menu-vertical switching-list grid-1-5 left">
- <li {{if .PageIsSettingsOptions}}class="current"{{end}}><a href="{{AppSubUrl}}/org/{{.Org.LowerName}}/settings">{{.i18n.Tr "org.settings.options"}}</a></li>
- <li {{if .PageIsSettingsHooks}}class="current"{{end}}><a href="{{AppSubUrl}}/org/{{.Org.LowerName}}/settings/hooks">{{.i18n.Tr "repo.settings.hooks"}}</a></li>
- <li {{if .PageIsSettingsDelete}}class="current"{{end}}><a href="{{AppSubUrl}}/org/{{.Org.LowerName}}/settings/delete">{{.i18n.Tr "org.settings.delete"}}</a></li>
- </ul>
- </div>
+ <div class="panel-header">
+ <strong>{{.i18n.Tr "org.settings"}}</strong>
+ </div>
+ <div class="panel-body">
+ <ul class="menu menu-vertical switching-list grid-1-5 left">
+ <li {{if .PageIsSettingsOptions}}class="current"{{end}}><a href="{{AppSubUrl}}/org/{{.Org.Name}}/settings">{{.i18n.Tr "org.settings.options"}}</a></li>
+ <li {{if .PageIsSettingsHooks}}class="current"{{end}}><a href="{{AppSubUrl}}/org/{{.Org.Name}}/settings/hooks">{{.i18n.Tr "repo.settings.hooks"}}</a></li>
+ <li {{if .PageIsSettingsDelete}}class="current"{{end}}><a href="{{AppSubUrl}}/org/{{.Org.Name}}/settings/delete">{{.i18n.Tr "org.settings.delete"}}</a></li>
+ </ul>
+ </div>
</div>
diff --git a/templates/org/settings/options.tmpl b/templates/org/settings/options.tmpl
index 1ed7acb56e..1179ede620 100644
--- a/templates/org/settings/options.tmpl
+++ b/templates/org/settings/options.tmpl
@@ -2,63 +2,63 @@
{{template "ng/base/header" .}}
{{template "org/base/header" .}}
<div id="setting-wrapper" class="main-wrapper">
- <div id="org-setting" class="container clear">
- {{template "org/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">
- <div class="panel-header">
- <strong>{{.i18n.Tr "org.settings.options"}}</strong>
- </div>
- <form class="form form-align panel-body" id="org-setting-form" action="{{AppSubUrl}}/org/{{.Org.LowerName}}/settings" method="post">
- {{.CsrfTokenHtml}}
- <input type="hidden" name="action" value="update">
- <div class="field">
- <label class="req" for="orgname">{{.i18n.Tr "username"}}</label>
- <input class="ipt ipt-large ipt-radius {{if .Err_UserName}}ipt-error{{end}}" id="orgname" name="uname" value="{{.Org.Name}}" data-orgname="{{.Org.Name}}" required />
- </div>
- <div class="white-popup-block mfp-hide" id="change-orgname-modal">
- <h1 class="text-red">{{.i18n.Tr "org.settings.change_orgname"}}</h1>
- <p>{{.i18n.Tr "org.settings.change_orgname_desc"}}</p>
- <br>
- <button class="btn btn-red btn-large btn-radius" id="change-orgname-submit">{{.i18n.Tr "settings.continue"}}</button>
- <button class="btn btn-large btn-radius popup-modal-dismiss">{{.i18n.Tr "settings.cancel"}}</button>
- </div>
- <div class="field">
- <label for="full-name">{{.i18n.Tr "org.settings.full_name"}}</label>
- <input class="ipt ipt-large ipt-radius {{if .Err_FullName}}ipt-error{{end}}" id="full-name" name="fullname" value="{{.Org.FullName}}" />
- </div>
- <div 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="{{.Org.Email}}" required />
- </div>
- <div class="field clear">
- <label class="left" for="desc">{{.i18n.Tr "org.org_desc"}}</label>
- <textarea class="ipt ipt-large ipt-radius {{if .Err_Description}}ipt-error{{end}}" id="desc" name="desc">{{.Org.Description}}</textarea>
- </div>
- <div class="field">
- <label for="website">{{.i18n.Tr "org.settings.website"}}</label>
- <input class="ipt ipt-large ipt-radius {{if .Err_Website}}ipt-error{{end}}" id="website" name="website" type="url" value="{{.Org.Website}}" />
- </div>
- <div class="field">
- <label for="location">{{.i18n.Tr "org.settings.location"}}</label>
- <input class="ipt ipt-large ipt-radius {{if .Err_Location}}ipt-error{{end}}" id="location" name="location" type="text" value="{{.Org.Location}}" />
- </div>
- <div 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="{{.Org.AvatarEmail}}" />
- </div>
- <div class="field">
- <span class="form-label"></span>
- <button class="btn btn-green btn-large btn-radius" id="change-orgname-btn" href="#change-orgname-modal">{{.i18n.Tr "org.settings.update_settings"}}</button>
- </div>
- </form>
- </div>
- </div>
+ <div id="org-setting" class="container clear">
+ {{template "org/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">
+ <div class="panel-header">
+ <strong>{{.i18n.Tr "org.settings.options"}}</strong>
</div>
- </div>
- </div>
+ <form class="form form-align panel-body" id="org-setting-form" action="{{AppSubUrl}}/org/{{.Org.LowerName}}/settings" method="post">
+ {{.CsrfTokenHtml}}
+ <input type="hidden" name="action" value="update">
+ <div class="field">
+ <label class="req" for="orgname">{{.i18n.Tr "username"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_UserName}}ipt-error{{end}}" id="orgname" name="uname" value="{{.Org.Name}}" data-orgname="{{.Org.Name}}" required />
+ </div>
+ <div class="white-popup-block mfp-hide" id="change-orgname-modal">
+ <h1 class="text-red">{{.i18n.Tr "org.settings.change_orgname"}}</h1>
+ <p>{{.i18n.Tr "org.settings.change_orgname_desc"}}</p>
+ <br>
+ <button class="btn btn-red btn-large btn-radius" id="change-orgname-submit">{{.i18n.Tr "settings.continue"}}</button>
+ <button class="btn btn-large btn-radius popup-modal-dismiss">{{.i18n.Tr "settings.cancel"}}</button>
+ </div>
+ <div class="field">
+ <label for="full-name">{{.i18n.Tr "org.settings.full_name"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_FullName}}ipt-error{{end}}" id="full-name" name="fullname" value="{{.Org.FullName}}" />
+ </div>
+ <div 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="{{.Org.Email}}" required />
+ </div>
+ <div class="field clear">
+ <label class="left" for="desc">{{.i18n.Tr "org.org_desc"}}</label>
+ <textarea class="ipt ipt-large ipt-radius {{if .Err_Description}}ipt-error{{end}}" id="desc" name="desc">{{.Org.Description}}</textarea>
+ </div>
+ <div class="field">
+ <label for="website">{{.i18n.Tr "org.settings.website"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_Website}}ipt-error{{end}}" id="website" name="website" type="url" value="{{.Org.Website}}" />
+ </div>
+ <div class="field">
+ <label for="location">{{.i18n.Tr "org.settings.location"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_Location}}ipt-error{{end}}" id="location" name="location" type="text" value="{{.Org.Location}}" />
+ </div>
+ <div 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="{{.Org.AvatarEmail}}" />
+ </div>
+ <div class="field">
+ <span class="form-label"></span>
+ <button class="btn btn-green btn-large btn-radius" id="change-orgname-btn" href="#change-orgname-modal">{{.i18n.Tr "org.settings.update_settings"}}</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
</div>
{{template "ng/base/footer" .}} \ No newline at end of file