From d9aa007a9e84bd255b16bd02b9ab18719cb650a2 Mon Sep 17 00:00:00 2001 From: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com> Date: Mon, 22 Jun 2020 22:20:51 +0200 Subject: Use label to describe repository type (#11891) * Use label instead of icon to describe repository type when repo avatar is set * header_icon is not longer duplicated; move out of separate template * handle archived case too * use everywhere * public template -> template * bring back separate icon in better form * definitely was overthinking this * 32 Co-authored-by: techknowlogick --- templates/explore/repo_list.tmpl | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'templates/explore/repo_list.tmpl') diff --git a/templates/explore/repo_list.tmpl b/templates/explore/repo_list.tmpl index 61ef056afc..97495e16b7 100644 --- a/templates/explore/repo_list.tmpl +++ b/templates/explore/repo_list.tmpl @@ -7,13 +7,26 @@ {{end}} {{if or $.PageIsExplore $.PageIsProfileStarList }}{{if .Owner}}{{.Owner.Name}} / {{end}}{{end}}{{.Name}} - {{if .IsArchived}}{{end}} - {{if .IsPrivate}} - {{svg "octicon-lock" 16}} - {{else if and (not .IsMirror) (not .IsFork) (.Owner.Visibility.IsPrivate) }} - {{svg "octicon-internal-repo" 16}} - {{else if .IsFork}} + {{if .IsArchived}}{{$.i18n.Tr "repo.desc.archived"}}{{end}} + {{if .IsTemplate}} + {{if .IsPrivate}} + {{$.i18n.Tr "repo.desc.private_template"}} + {{else}} + {{if .Owner.Visibility.IsPrivate}} + {{$.i18n.Tr "repo.desc.internal_template"}} + {{end}} + {{end}} + {{else}} + {{if .IsPrivate}} + {{$.i18n.Tr "repo.desc.private"}} + {{else}} + {{if .Owner.Visibility.IsPrivate}} + {{$.i18n.Tr "repo.desc.internal"}} + {{end}} + {{end}} + {{end}} + {{if .IsFork}} {{svg "octicon-repo-forked" 16}} {{else if .IsMirror}} {{svg "octicon-repo-clone" 16}} -- cgit v1.2.3