summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2018-12-09 14:42:11 +0800
committerLauris BH <lauris@nix.lv>2018-12-09 08:42:11 +0200
commit7c0c9655325b5413a8bb25bbc5b668d87582e8c8 (patch)
tree13e321d12adc98cb824f07fdfc1e22841cf6d00d /templates
parentda5a0b8382c4b5c9913fa02d0a801e543e5a0699 (diff)
downloadgitea-7c0c9655325b5413a8bb25bbc5b668d87582e8c8.tar.gz
gitea-7c0c9655325b5413a8bb25bbc5b668d87582e8c8.zip
Improve team members and repositories settings UI (#5457)
* improve team members and repositories settings UI * use tab on team pages * add default description on team members and repos * add blank on numbers and texts * improve translation
Diffstat (limited to 'templates')
-rw-r--r--templates/org/team/members.tmpl8
-rw-r--r--templates/org/team/navbar.tmpl4
-rw-r--r--templates/org/team/repositories.tmpl8
-rw-r--r--templates/org/team/sidebar.tmpl5
4 files changed, 15 insertions, 10 deletions
diff --git a/templates/org/team/members.tmpl b/templates/org/team/members.tmpl
index 54785b0be3..7633bec823 100644
--- a/templates/org/team/members.tmpl
+++ b/templates/org/team/members.tmpl
@@ -6,9 +6,7 @@
<div class="ui grid">
{{template "org/team/sidebar" .}}
<div class="ui ten wide column">
- <div class="ui top attached header">
- {{.i18n.Tr "org.teams.members"}}
- </div>
+ {{template "org/team/navbar" .}}
<div class="ui attached table segment members">
{{range .Team.Members}}
<div class="item">
@@ -20,6 +18,10 @@
{{.DisplayName}}
</a>
</div>
+ {{else}}
+ <div class="item">
+ <span class="text grey italic">{{$.i18n.Tr "org.teams.members.none"}}</span>
+ </div>
{{end}}
</div>
{{if .IsOrganizationOwner}}
diff --git a/templates/org/team/navbar.tmpl b/templates/org/team/navbar.tmpl
new file mode 100644
index 0000000000..1a8f108331
--- /dev/null
+++ b/templates/org/team/navbar.tmpl
@@ -0,0 +1,4 @@
+<div class="ui top attached tabular menu">
+ <a class="item{{if .PageIsOrgTeamMembers}} active{{end}}" href="{{.OrgLink}}/teams/{{.Team.LowerName}}"><span class="octicon octicon-person"></span> <strong>{{.Team.NumMembers}}</strong>&nbsp; {{$.i18n.Tr "org.lower_members"}}</a>
+ <a class="item{{if .PageIsOrgTeamRepos}} active{{end}}" href="{{.OrgLink}}/teams/{{.Team.LowerName}}/repositories"><span class="octicon octicon-repo"></span> <strong>{{.Team.NumRepos}}</strong>&nbsp; {{$.i18n.Tr "org.lower_repositories"}}</a>
+</div> \ No newline at end of file
diff --git a/templates/org/team/repositories.tmpl b/templates/org/team/repositories.tmpl
index e73b85c40b..fafe15e128 100644
--- a/templates/org/team/repositories.tmpl
+++ b/templates/org/team/repositories.tmpl
@@ -6,9 +6,7 @@
<div class="ui grid">
{{template "org/team/sidebar" .}}
<div class="ui ten wide column">
- <div class="ui top attached header">
- {{.i18n.Tr "org.teams.repositories"}}
- </div>
+ {{template "org/team/navbar" .}}
<div class="ui attached table segment repositories">
{{$canAddRemove := and $.IsOrganizationOwner (not (eq $.Team.LowerName "owners"))}}
{{range .Team.Repos}}
@@ -21,6 +19,10 @@
<strong>{{$.Org.Name}}/{{.Name}}</strong>
</a>
</div>
+ {{else}}
+ <div class="item">
+ <span class="text grey italic">{{$.i18n.Tr "org.teams.repos.none"}}</span>
+ </div>
{{end}}
</div>
{{if $canAddRemove}}
diff --git a/templates/org/team/sidebar.tmpl b/templates/org/team/sidebar.tmpl
index 0edfcd0148..846613e32e 100644
--- a/templates/org/team/sidebar.tmpl
+++ b/templates/org/team/sidebar.tmpl
@@ -17,10 +17,7 @@
<span class="text grey italic">{{.i18n.Tr "org.teams.no_desc"}}</span>
{{end}}
</div>
- <div class="item">
- <a href="{{.OrgLink}}/teams/{{.Team.LowerName}}"><span class="octicon octicon-person"></span> <strong>{{.Team.NumMembers}}</strong> {{$.i18n.Tr "org.lower_members"}}</a> ยท
- <a href="{{.OrgLink}}/teams/{{.Team.LowerName}}/repositories"><span class="octicon octicon-repo"></span> <strong>{{.Team.NumRepos}}</strong> {{$.i18n.Tr "org.lower_repositories"}}</a>
- </div>
+
<div class="item">
{{if eq .Team.LowerName "owners"}}
{{.i18n.Tr "org.teams.owners_permission_desc" | Str2html}}