Retrospring/app/views/modal/ban/_history.html.haml

15 lines
707 B
Plaintext
Raw Normal View History

2022-07-02 03:19:56 -07:00
.modal-body
%p= t '.count', user: user.screen_name, count: user.bans.count
.list-group
2022-07-02 03:54:56 -07:00
- user.bans.order(:created_at).reverse_order.each do |ban|
2022-07-02 03:53:14 -07:00
.list-group-item{ class: ban.current? ? 'list-group-item-success' : '' }
2022-07-02 03:19:56 -07:00
.d-flex.w-100.justify-content-between
%h5.mb-1= ban.reason
%small.text-muted= t('time.distance_ago', time: time_ago_in_words(ban.created_at))
2022-07-02 03:19:56 -07:00
- if ban.banned_by.present?
%p= t('.issued_by', user: ban.banned_by.screen_name)
- if ban.expires_at.present?
2022-07-02 03:53:14 -07:00
%small= t(ban.expires_at.past? ? '.expired' : '.until', until: ban.expires_at.strftime('%Y-%m-%d %H:%M:%S'))
2022-07-02 03:19:56 -07:00
- else
%small= t('.permanent')