diff --git a/app/views/settings/featured_tags/_featured_tag.html.haml b/app/views/settings/featured_tags/_featured_tag.html.haml new file mode 100644 index 0000000000..f790b5e39b --- /dev/null +++ b/app/views/settings/featured_tags/_featured_tag.html.haml @@ -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 diff --git a/app/views/settings/featured_tags/index.html.haml b/app/views/settings/featured_tags/index.html.haml index b7f6e56b3d..dcefe1b3b8 100644 --- a/app/views/settings/featured_tags/index.html.haml +++ b/app/views/settings/featured_tags/index.html.haml @@ -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'