2
0

Support displaying polls in Admin UI (#35933)

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Emelia Smith
2025-09-01 16:59:03 +02:00
committed by GitHub
parent 6f8187e595
commit 15401e6988
5 changed files with 43 additions and 5 deletions

View File

@@ -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)