mirror of
https://github.com/yingziwu/mastodon.git
synced 2026-02-04 03:25:14 +00:00
Support displaying polls in Admin UI (#35933)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
6f8187e595
commit
15401e6988
5 changed files with 43 additions and 5 deletions
|
|
@ -1,3 +1,18 @@
|
|||
- if status.with_poll?
|
||||
.poll
|
||||
%ul
|
||||
- status.preloadable_poll.options.each_with_index do |option, _index|
|
||||
%li
|
||||
%label.poll__option.disabled<>
|
||||
- if status.preloadable_poll.multiple?
|
||||
%span.poll__input.checkbox{ role: 'checkbox', 'aria-label': option }
|
||||
- else
|
||||
%span.poll__input{ role: 'radio', 'aria-label': option }
|
||||
%span.poll__option__text
|
||||
= prerender_custom_emojis(html_aware_format(option, status.local?, multiline: false), status.emojis)
|
||||
%button.button.button-secondary{ disabled: true }
|
||||
= t('polls.vote')
|
||||
|
||||
- if status.with_media?
|
||||
- if status.ordered_media_attachments.first.video?
|
||||
= render_video_component(status, visible: false)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue