Show emojis in poll options
authorr <r@freesoftwareextremist.com>
Sat, 16 Jan 2021 10:38:32 +0000 (10:38 +0000)
committerr <r@freesoftwareextremist.com>
Sat, 16 Jan 2021 10:38:32 +0000 (10:38 +0000)
templates/status.tmpl

index 6071b2fc803b220a0a966d16bd13ca443c611c92..e842a96c308d26c9dcbec29025cbbaca12e8b14e 100644 (file)
                                {{range $i, $o := .Poll.Options}}
                                <div class="poll-option">
                                        {{if (or $s.Poll.Expired $s.Poll.Voted)}}
-                                       <div> {{$o.Title}} - {{$o.VotesCount}} votes </div>
+                                       <div> {{EmojiFilter $o.Title $s.Emojis}} - {{$o.VotesCount}} votes </div>
                                        {{else}}
                                        <input type="{{if $s.Poll.Multiple}}checkbox{{else}}radio{{end}}" name="choices" 
                                                id="poll-{{$s.ID}}-{{$i}}" value="{{$i}}">
                                        <label for="poll-{{$s.ID}}-{{$i}}"> 
-                                               {{$o.Title}} 
+                                               {{EmojiFilter $o.Title $s.Emojis}} 
                                        </label>
                                        {{end}}
                                </div>