aboutsummaryrefslogtreecommitdiffstats
path: root/templates/org/team/sidebar.tmpl
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-08-24 21:09:05 +0800
committerUnknwon <joe2010xtmf@163.com>2014-08-24 21:09:05 +0800
commit21a1b8e5a35c61bff30145ac3194ea893a9c6b68 (patch)
treeb218aedd0d64252d95725f12338a1ced1f155ba9 /templates/org/team/sidebar.tmpl
parente325c8499a102ba8a6a84236c02dd7951f46cec5 (diff)
downloadgitea-21a1b8e5a35c61bff30145ac3194ea893a9c6b68.tar.gz
gitea-21a1b8e5a35c61bff30145ac3194ea893a9c6b68.zip
Finish new edit team page, add member to team
Diffstat (limited to 'templates/org/team/sidebar.tmpl')
-rw-r--r--templates/org/team/sidebar.tmpl18
1 files changed, 13 insertions, 5 deletions
diff --git a/templates/org/team/sidebar.tmpl b/templates/org/team/sidebar.tmpl
index 1ab24e9aac..b760e002fc 100644
--- a/templates/org/team/sidebar.tmpl
+++ b/templates/org/team/sidebar.tmpl
@@ -1,9 +1,9 @@
<div class="grid-1-3 panel panel-radius left" id="org-team-card">
<div class="panel-header">
{{if .Team.IsMember $.SignedUser.Id}}
- <a class="btn btn-small btn-red btn-header btn-radius right" href="{{.OrgLink}}/teams/{{.Team.LowerName}}/action/leave?page=team">{{$.i18n.Tr "org.teams.leave"}}</a>
- {{else}}
- <a class="btn btn-small btn-blue btn-header btn-radius right" href="{{.OrgLink}}/teams/{{.Team.LowerName}}/action/join?page=team">{{$.i18n.Tr "org.teams.join"}}</a>
+ <a class="btn btn-small btn-red btn-header btn-radius right" href="{{.OrgLink}}/teams/{{.Team.LowerName}}/action/leave?uid={{$.SignedUser.Id}}&page=team">{{$.i18n.Tr "org.teams.leave"}}</a>
+ {{else if .IsOrganizationOwner}}
+ <a class="btn btn-small btn-blue btn-header btn-radius right" href="{{.OrgLink}}/teams/{{.Team.LowerName}}/action/join?uid={{$.SignedUser.Id}}&page=team">{{$.i18n.Tr "org.teams.join"}}</a>
{{end}}
<strong>{{.Team.Name}}</strong>
</div>
@@ -11,16 +11,24 @@
<p class="desc">{{if .Team.Description}}{{.Team.Description}}{{else}}{{.i18n.Tr "org.teams.no_desc"}}{{end}}</p>
<hr>
<div class="team-stats">
- <a class="text-black"><strong>{{.Team.NumMembers}}</strong> {{$.i18n.Tr "org.lower_members"}}</a> ·
- <a class="text-black"><strong>{{.Team.NumRepos}}</strong> {{$.i18n.Tr "org.lower_repositories"}}</a>
+ <a class="text-black" href="{{.OrgLink}}/teams/{{.Team.LowerName}}"><strong>{{.Team.NumMembers}}</strong> {{$.i18n.Tr "org.lower_members"}}</a> ·
+ <a class="text-black" href="{{.OrgLink}}/teams/{{.Team.LowerName}}/repositories"><strong>{{.Team.NumRepos}}</strong> {{$.i18n.Tr "org.lower_repositories"}}</a>
</div>
<p class="desc">
{{if eq .Team.LowerName "owners"}}
{{.i18n.Tr "org.teams.owners_permission_desc" | Str2html}}
+ {{else if (eq .Team.Authorize 1)}}
+ {{.i18n.Tr "org.teams.read_permission_desc" | Str2html}}
+ {{else if (eq .Team.Authorize 2)}}
+ {{.i18n.Tr "org.teams.write_permission_desc" | Str2html}}
+ {{else if (eq .Team.Authorize 3)}}
+ {{.i18n.Tr "org.teams.admin_permission_desc" | Str2html}}
{{end}}
</p>
</div>
+ {{if .IsOrganizationOwner}}
<div class="panel-footer">
<a class="btn btn-medium btn-green btn-link btn-radius" href="{{.OrgLink}}/teams/{{.Team.LowerName}}/edit"><span class="octicon octicon-gear"></span> {{$.i18n.Tr "org.teams.settings"}}</a>
</div>
+ {{end}}
</div> \ No newline at end of file