diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/admin/announcements/_announcement.html.haml | 9 | ||||
-rw-r--r-- | app/views/admin/announcements/edit.html.haml | 2 | ||||
-rw-r--r-- | app/views/directories/index.html.haml | 2 | ||||
-rw-r--r-- | app/views/relationships/_account.html.haml | 2 |
4 files changed, 11 insertions, 4 deletions
diff --git a/app/views/admin/announcements/_announcement.html.haml b/app/views/admin/announcements/_announcement.html.haml index 75768c7ba..f8a6c66de 100644 --- a/app/views/admin/announcements/_announcement.html.haml +++ b/app/views/admin/announcements/_announcement.html.haml @@ -10,5 +10,12 @@ - else = l(announcement.created_at) %td - = table_link_to 'pencil', t('generic.edit'), edit_admin_announcement_path(announcement) if can?(:update, announcement) + - if can?(:update, announcement) + - if announcement.published? + = table_link_to 'pause', t('admin.announcements.unpublish'), unpublish_admin_announcement_path(announcement), method: :post, data: { confirm: t('admin.accounts.are_you_sure') } + - else + = table_link_to 'play', t('admin.announcements.publish'), publish_admin_announcement_path(announcement), method: :post, data: { confirm: t('admin.accounts.are_you_sure') } + + = table_link_to 'pencil', t('generic.edit'), edit_admin_announcement_path(announcement) + = table_link_to 'trash', t('generic.delete'), admin_announcement_path(announcement), method: :delete, data: { confirm: t('admin.accounts.are_you_sure') } if can?(:destroy, announcement) diff --git a/app/views/admin/announcements/edit.html.haml b/app/views/admin/announcements/edit.html.haml index c5c605e93..5f56db5e7 100644 --- a/app/views/admin/announcements/edit.html.haml +++ b/app/views/admin/announcements/edit.html.haml @@ -14,7 +14,7 @@ .fields-group = f.input :text, wrapper: :with_block_label - - if @announcement.scheduled_at.present? && !@announcement.published? + - unless @announcement.published? .fields-group = f.input :scheduled_at, include_blank: true, wrapper: :with_block_label diff --git a/app/views/directories/index.html.haml b/app/views/directories/index.html.haml index dee99475a..ecf12b649 100644 --- a/app/views/directories/index.html.haml +++ b/app/views/directories/index.html.haml @@ -47,7 +47,7 @@ %small= t('accounts.followers', count: account.followers_count).downcase .accounts-table__count - if account.last_status_at.present? - %time.time-ago{ datetime: account.last_status_at.iso8601, title: l(account.last_status_at) }= l account.last_status_at + %time.time-ago{ datetime: account.last_status_at.to_date.iso8601, title: l(account.last_status_at.to_date) }= l account.last_status_at.to_date - else = t('accounts.never_active') diff --git a/app/views/relationships/_account.html.haml b/app/views/relationships/_account.html.haml index 6c22deb51..af5a4aaf7 100644 --- a/app/views/relationships/_account.html.haml +++ b/app/views/relationships/_account.html.haml @@ -14,7 +14,7 @@ %small= t('accounts.followers', count: account.followers_count).downcase %td.accounts-table__count - if account.last_status_at.present? - %time.time-ago{ datetime: account.last_status_at.iso8601, title: l(account.last_status_at) }= l account.last_status_at + %time.time-ago{ datetime: account.last_status_at.to_date.iso8601, title: l(account.last_status_at.to_date) }= l account.last_status_at - else \- %small= t('accounts.last_active') |