diff options
author | Rémy Boulanouar <rboulanouar@gmail.com> | 2017-06-02 10:43:44 +0200 |
---|---|---|
committer | Bo-Yi Wu <appleboy.tw@gmail.com> | 2017-06-02 03:43:44 -0500 |
commit | 62f600cf1ca5ffe029e470644839ea39283bf023 (patch) | |
tree | b2de4dda4c42354b2f0452c17c00084f89fd8912 /templates/user | |
parent | 976c2a05fafcecc454634206f9072f3ae23bc055 (diff) | |
download | gitea-62f600cf1ca5ffe029e470644839ea39283bf023.tar.gz gitea-62f600cf1ca5ffe029e470644839ea39283bf023.zip |
Display all organization from user settings (#1739)
* Display all organization from user settings
* fix Tab selection
* Update locale_en-US.ini
* Add a condition for display Create organization button
* Remove french translation
* Remove unnecessary admin flag
Diffstat (limited to 'templates/user')
-rw-r--r-- | templates/user/settings/navbar.tmpl | 3 | ||||
-rw-r--r-- | templates/user/settings/organization.tmpl | 35 |
2 files changed, 38 insertions, 0 deletions
diff --git a/templates/user/settings/navbar.tmpl b/templates/user/settings/navbar.tmpl index 4aac9effb5..ab9b41666d 100644 --- a/templates/user/settings/navbar.tmpl +++ b/templates/user/settings/navbar.tmpl @@ -28,6 +28,9 @@ <a class="{{if .PageIsSettingsAccountLink}}active{{end}} item" href="{{AppSubUrl}}/user/settings/account_link"> {{.i18n.Tr "settings.account_link"}} </a> + <a class="{{if .PageIsSettingsOrganization}}active{{end}} item" href="{{AppSubUrl}}/user/settings/organization"> + {{.i18n.Tr "settings.organization"}} + </a> <a class="{{if .PageIsSettingsDelete}}active{{end}} item" href="{{AppSubUrl}}/user/settings/delete"> {{.i18n.Tr "settings.delete"}} </a> diff --git a/templates/user/settings/organization.tmpl b/templates/user/settings/organization.tmpl new file mode 100644 index 0000000000..2d357cb3b5 --- /dev/null +++ b/templates/user/settings/organization.tmpl @@ -0,0 +1,35 @@ +{{template "base/head" .}} +<div class="user settings account_link"> + {{template "user/settings/navbar" .}} + <div class="ui container"> + {{template "base/alert" .}} + <h4 class="ui top attached header"> + {{.i18n.Tr "settings.orgs"}} + {{if .SignedUser.CanCreateOrganization}} + <div class="ui right"> + <a class="ui black tiny button" href="{{AppSubUrl}}/org/create">{{.i18n.Tr "admin.orgs.new_orga"}}</a> + </div> + {{end}} + </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"> + <a class="ui blue small button" href="{{AppSubUrl}}/org/{{.Name}}/members/action/leave?uid={{.ID}}">{{$.i18n.Tr "org.members.leave"}}</a> + </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> +{{template "base/footer" .}} |