File tree Expand file tree Collapse file tree 2 files changed +3
-9
lines changed
templates/repo/issue/view_content Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -199,19 +199,14 @@ const (
199199 RoleDescriptorContributor Role = "contributor"
200200)
201201
202- // HasRole returns if a role is not none
203- func (rd RoleDescriptor ) HasRole () bool {
204- return rd .Role != ""
205- }
206-
207202// LocaleString returns the locale string name of the Status
208203func (r Role ) LocaleString (lang translation.Locale ) string {
209- return lang .Tr ("repo.issues.role." + r . Role )
204+ return lang .Tr ("repo.issues.role." + string ( r ) )
210205}
211206
212207// LocaleHelper returns the locale string name of the Status
213208func (r Role ) LocaleHelper (lang translation.Locale ) string {
214- return lang .Tr ("repo.issues.role." + r . Role + "_helper" )
209+ return lang .Tr ("repo.issues.role." + string ( r ) + "_helper" )
215210}
216211
217212// Comment represents a comment in commit and issue page.
Original file line number Diff line number Diff line change 33 {{ctx.Locale.Tr "repo.issues.author"}}
44 </div>
55{{end}}
6-
7- {{if (.ShowRole.Role.HasRole)}}
6+ {{if .ShowRole.Role}}
87 <div class="ui basic label role-label" data-tooltip-content="{{.ShowRole.Role.LocaleHelper ctx.Locale}}">
98 {{.ShowRole.Role.LocaleString ctx.Locale}}
109 </div>
You can’t perform that action at this time.
0 commit comments