diff options
author | Norwin <noerw@users.noreply.github.com> | 2021-03-12 15:14:02 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-12 16:14:02 +0100 |
commit | 855a4f476e848dcb60422d299f003e69adbdc79a (patch) | |
tree | e88bc7be072bfb178e5229bf655038387691e19b /templates/repo/issue | |
parent | 91ee3be58868eca4cf678932535dd721d591e06e (diff) | |
download | gitea-855a4f476e848dcb60422d299f003e69adbdc79a.tar.gz gitea-855a4f476e848dcb60422d299f003e69adbdc79a.zip |
don't show project cog in issue sidebar if no permission (#14953)
Diffstat (limited to 'templates/repo/issue')
-rw-r--r-- | templates/repo/issue/view_content/sidebar.tmpl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl index e068e72d65..7b4e522e86 100644 --- a/templates/repo/issue/view_content/sidebar.tmpl +++ b/templates/repo/issue/view_content/sidebar.tmpl @@ -195,7 +195,9 @@ <div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-project dropdown"> <span class="text"> <strong>{{.i18n.Tr "repo.issues.new.projects"}}</strong> - {{svg "octicon-gear"}} + {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}} + {{svg "octicon-gear"}} + {{end}} </span> <div class="menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/projects"> <div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_projects"}}</div> |