Skip to content

Commit 4605ee5

Browse files
committed
don't show manage topics link when no permission
1 parent cc5dc73 commit 4605ee5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

templates/repo/home.tmpl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{{template "base/alert" .}}
66
<div class="ui repo-description">
77
<div id="repo-desc">
8-
{{if .Repository.DescriptionHTML}}<span class="description has-emoji">{{.Repository.DescriptionHTML}}</span>{{else if .IsRepositoryAdmin}}<span class="no-description text-italic">{{.i18n.Tr "repo.no_desc"}}</span>{{end}}
8+
{{if .Repository.DescriptionHTML}}<span class="description has-emoji">{{.Repository.DescriptionHTML}}</span>{{else}}<span class="no-description text-italic">{{.i18n.Tr "repo.no_desc"}}</span>{{end}}
99
<a class="link" href="{{.Repository.Website}}">{{.Repository.Website}}</a>
1010
</div>
1111
{{if .RepoSearchEnabled}}
@@ -24,8 +24,10 @@
2424
{{end}}
2525
</div>
2626
<div class="ui repo-topic" id="repo-topic">
27-
{{range .Topics}}<div class="ui label teal topic" style="cursor:pointer;">{{.Name}}</div>{{end}}<a id="manage_topic" style="cursor:pointer;margin-left:10px;">{{.i18n.Tr "repo.topic.manage_topics"}}</a>
27+
{{range .Topics}}<div class="ui label teal topic" style="cursor:pointer;">{{.Name}}</div>{{end}}
28+
{{if .IsRepositoryAdmin}}<a id="manage_topic" style="cursor:pointer;margin-left:10px;">{{.i18n.Tr "repo.topic.manage_topics"}}</a>{{end}}
2829
</div>
30+
{{if .IsRepositoryAdmin}}
2931
<div class="ui repo-topic-edit grid" id="topic_edit" >
3032
<div class="fourteen wide column">
3133
<div class="ui fluid multiple search selection dropdown">
@@ -41,6 +43,7 @@
4143
data-link="{{.RepoLink}}/topics">{{.i18n.Tr "repo.topic.done"}}</a>
4244
</div>
4345
</div>
46+
{{end}}
4447
{{template "repo/sub_menu" .}}
4548
<div class="ui stackable secondary menu mobile--margin-between-items mobile--no-negative-margins">
4649
{{if and .PullRequestCtx.Allowed .IsViewBranch}}

0 commit comments

Comments
 (0)