Use partial to render settings/featured_tags (#36174)
This commit is contained in:
parent
621628e2cf
commit
8fa91b4b81
17
app/views/settings/featured_tags/_featured_tag.html.haml
Normal file
17
app/views/settings/featured_tags/_featured_tag.html.haml
Normal file
@ -0,0 +1,17 @@
|
||||
.directory__tag
|
||||
%div
|
||||
%h2
|
||||
= material_symbol 'tag'
|
||||
= featured_tag.display_name
|
||||
%small
|
||||
- if featured_tag.last_status_at?
|
||||
%time.formatted{ datetime: featured_tag.last_status_at.iso8601, title: l(featured_tag.last_status_at) }= l featured_tag.last_status_at
|
||||
- else
|
||||
= t('accounts.nothing_here')
|
||||
= table_link_to 'delete',
|
||||
t('filters.index.delete'),
|
||||
settings_featured_tag_path(featured_tag),
|
||||
data: { confirm: t('admin.accounts.are_you_sure') },
|
||||
method: :delete
|
||||
|
||||
.trends__item__current= friendly_number_to_human featured_tag.statuses_count
|
||||
@ -20,16 +20,4 @@
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
- @featured_tags.each do |featured_tag|
|
||||
.directory__tag
|
||||
%div
|
||||
%h2
|
||||
= material_symbol 'tag'
|
||||
= featured_tag.display_name
|
||||
%small
|
||||
- if featured_tag.last_status_at.nil?
|
||||
= t('accounts.nothing_here')
|
||||
- else
|
||||
%time.formatted{ datetime: featured_tag.last_status_at.iso8601, title: l(featured_tag.last_status_at) }= l featured_tag.last_status_at
|
||||
= table_link_to 'delete', t('filters.index.delete'), settings_featured_tag_path(featured_tag), method: :delete, data: { confirm: t('admin.accounts.are_you_sure') }
|
||||
.trends__item__current= friendly_number_to_human featured_tag.statuses_count
|
||||
= render collection: @featured_tags, partial: 'settings/featured_tags/featured_tag'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user