File tree 2 files changed +3
-9
lines changed
templates/repo/issue/view_content
2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -199,19 +199,14 @@ const (
199
199
RoleDescriptorContributor Role = "contributor"
200
200
)
201
201
202
- // HasRole returns if a role is not none
203
- func (rd RoleDescriptor ) HasRole () bool {
204
- return rd .Role != ""
205
- }
206
-
207
202
// LocaleString returns the locale string name of the Status
208
203
func (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 ) )
210
205
}
211
206
212
207
// LocaleHelper returns the locale string name of the Status
213
208
func (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" )
215
210
}
216
211
217
212
// Comment represents a comment in commit and issue page.
Original file line number Diff line number Diff line change 3
3
{{ctx.Locale.Tr "repo.issues.author"}}
4
4
</div>
5
5
{{end}}
6
-
7
- {{if (.ShowRole.Role.HasRole)}}
6
+ {{if .ShowRole.Role}}
8
7
<div class="ui basic label role-label" data-tooltip-content="{{.ShowRole.Role.LocaleHelper ctx.Locale}}">
9
8
{{.ShowRole.Role.LocaleString ctx.Locale}}
10
9
</div>
You can’t perform that action at this time.
0 commit comments