diff options
author | mrsdizzie <info@mrsdizzie.com> | 2020-04-30 04:10:15 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-30 09:10:15 +0100 |
commit | a2683e5ddb65c4fb4455872cbf377b59dba14f86 (patch) | |
tree | a5dfcfd0da878d1c6925c55760d530c99b46549e /templates/repo/issue/view_content/sidebar.tmpl | |
parent | 310699bca71f15cc7b46363800574ba6e74d8c5c (diff) | |
download | gitea-a2683e5ddb65c4fb4455872cbf377b59dba14f86.tar.gz gitea-a2683e5ddb65c4fb4455872cbf377b59dba14f86.zip |
Allow emoji short code in labels (#11250)
* Allow emoji short code in labels
As title, turn :alias: type short code into emojis when rendering labels to match previous behavior
* Update models/issue_label.go
Co-Authored-By: John Olheiser <john.olheiser@gmail.com>
* render text in templates not code
* remove has-emoji class
🧙♀️
* fix new issue form
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'templates/repo/issue/view_content/sidebar.tmpl')
-rw-r--r-- | templates/repo/issue/view_content/sidebar.tmpl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl index 941141b55f..2c355a9c00 100644 --- a/templates/repo/issue/view_content/sidebar.tmpl +++ b/templates/repo/issue/view_content/sidebar.tmpl @@ -111,13 +111,13 @@ <div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_labels"}}</div> {{if or .Labels .OrgLabels}} {{range .Labels}} - <a class="{{if .IsChecked}}checked{{end}} item has-emoji" href="#" data-id="{{.ID}}" data-id-selector="#label_{{.ID}}"><span class="octicon-check {{if not .IsChecked}}invisible{{end}}">{{svg "octicon-check" 16}}</span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}} - {{if .Description }}<br><small class="desc">{{.Description}}</small>{{end}}</a> + <a class="{{if .IsChecked}}checked{{end}} item" href="#" data-id="{{.ID}}" data-id-selector="#label_{{.ID}}"><span class="octicon-check {{if not .IsChecked}}invisible{{end}}">{{svg "octicon-check" 16}}</span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name | RenderEmojiPlain}} + {{if .Description }}<br><small class="desc">{{.Description | RenderEmojiPlain}}</small>{{end}}</a> {{end}} <div class="ui divider"></div> {{range .OrgLabels}} - <a class="{{if .IsChecked}}checked{{end}} item has-emoji" href="#" data-id="{{.ID}}" data-id-selector="#label_{{.ID}}"><span class="octicon-check {{if not .IsChecked}}invisible{{end}}">{{svg "octicon-check" 16}}</span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}} - {{if .Description }}<br><small class="desc">{{.Description}}</small>{{end}}</a> + <a class="{{if .IsChecked}}checked{{end}} item" href="#" data-id="{{.ID}}" data-id-selector="#label_{{.ID}}"><span class="octicon-check {{if not .IsChecked}}invisible{{end}}">{{svg "octicon-check" 16}}</span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name | RenderEmojiPlain}} + {{if .Description }}<br><small class="desc">{{.Description | RenderEmojiPlain}}</small>{{end}}</a> {{end}} {{else}} <div class="header" style="text-transform: none;font-size:14px;">{{.i18n.Tr "repo.issues.new.no_items"}}</div> @@ -128,12 +128,12 @@ <span class="no-select item {{if .HasSelectedLabel}}hide{{end}}">{{.i18n.Tr "repo.issues.new.no_label"}}</span> {{range .Labels}} <div class="item"> - <a class="ui label has-emoji {{if not .IsChecked}}hide{{end}}" id="label_{{.ID}}" href="{{$.RepoLink}}/issues?labels={{.ID}}" style="color: {{.ForegroundColor}}; background-color: {{.Color}}" title="{{.Description}}">{{.Name}}</a> + <a class="ui label {{if not .IsChecked}}hide{{end}}" id="label_{{.ID}}" href="{{$.RepoLink}}/issues?labels={{.ID}}" style="color: {{.ForegroundColor}}; background-color: {{.Color}}" title="{{.Description}}">{{.Name | RenderEmojiPlain}}</a> </div> {{end}} {{range .OrgLabels}} <div class="item"> - <a class="ui label has-emoji {{if not .IsChecked}}hide{{end}}" id="label_{{.ID}}" href="{{$.RepoLink}}/issues?labels={{.ID}}" style="color: {{.ForegroundColor}}; background-color: {{.Color}}" title="{{.Description}}">{{.Name}}</a> + <a class="ui label {{if not .IsChecked}}hide{{end}}" id="label_{{.ID}}" href="{{$.RepoLink}}/issues?labels={{.ID}}" style="color: {{.ForegroundColor}}; background-color: {{.Color}}" title="{{.Description}}">{{.Name | RenderEmojiPlain}}</a> </div> {{end}} |