aboutsummaryrefslogtreecommitdiff
path: root/templates/user
diff options
context:
space:
mode:
authorRémy Boulanouar <rboulanouar@gmail.com>2017-01-28 04:02:27 +0100
committer无闻 <u@gogs.io>2017-01-27 22:02:27 -0500
commit2ee0c61e62a47a620bf0e8f55c896616062008c1 (patch)
treee59ad87b381f36bf537d9255c28411327ac50e7e /templates/user
parent3d23c131609e382c8874da247787cddb10ca0204 (diff)
Setting orgs (#3587)
* Implement organizations listing in setting and allow user to create new organization. * Implement organizations listing in setting and allow user to create new organization. * Add space remove by mistake * Remove unused part of the template * Update display and behavior according to @Unknown remarks
Diffstat (limited to 'templates/user')
-rw-r--r--templates/user/settings/navbar.tmpl3
-rw-r--r--templates/user/settings/organizations.tmpl37
2 files changed, 40 insertions, 0 deletions
diff --git a/templates/user/settings/navbar.tmpl b/templates/user/settings/navbar.tmpl
index 5166bafa..4293fed0 100644
--- a/templates/user/settings/navbar.tmpl
+++ b/templates/user/settings/navbar.tmpl
@@ -19,6 +19,9 @@
<a class="{{if .PageIsSettingsApplications}}active{{end}} item" href="{{AppSubUrl}}/user/settings/applications">
{{.i18n.Tr "settings.applications"}}
</a>
+ <a class="{{if .PageIsSettingsOrganizations}}active{{end}} item" href="{{AppSubUrl}}/user/settings/organizations">
+ {{.i18n.Tr "settings.orgs"}}
+ </a>
<a class="{{if .PageIsSettingsDelete}}active{{end}} item" href="{{AppSubUrl}}/user/settings/delete">
{{.i18n.Tr "settings.delete"}}
</a>
diff --git a/templates/user/settings/organizations.tmpl b/templates/user/settings/organizations.tmpl
new file mode 100644
index 00000000..64bdf9e0
--- /dev/null
+++ b/templates/user/settings/organizations.tmpl
@@ -0,0 +1,37 @@
+{{template "base/head" .}}
+<div class="user settings organizations">
+ <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.orgs"}}
+ <div class="ui right">
+ <a class="ui blue tiny button" href="{{AppSubUrl}}/org/create">{{.i18n.Tr "new_org"}}</a>
+ </div>
+ </h4>
+ <div class="ui attached segment orgs">
+ {{if .Orgs}}
+ <div class="ui middle aligned divided list">
+ {{range .Orgs}}
+ <div class="item">
+ <div class="right floated content">
+ <div class="ui button">Leave</div>
+ </div>
+ <img class="ui mini image" src="{{.RelAvatarLink}}">
+ <div class="content">
+ <a href="{{.HomeLink}}">{{.Name}}</a>
+ </div>
+ </div>
+ {{end}}
+ </div>
+ {{else}}
+ {{.i18n.Tr "settings.orgs_none"}}
+ {{end}}
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+{{template "base/footer" .}}