11< h1 > Warnings sent to <%= user_link @user %> </ h1 >
22
33< table class ="table is-full-width is-with-hover ">
4+ < tr >
5+ < th > Date</ th >
6+ < th > Type</ th >
7+ < th > From</ th >
8+ < th > Excerpt</ th >
9+ < th > Status</ th >
10+ </ tr >
11+ <% @warnings . each do |w | %>
412 < tr >
5- < th > Date</ th >
6- < th > Type</ th >
7- < th > From</ th >
8- < th > Excerpt</ th >
9- < th > Status</ th >
13+ < td >
14+ < span title ="<%= w . created_at . iso8601 %> "> <%= time_ago_in_words ( w . created_at ) %> ago</ span >
15+ </ td >
16+ < td >
17+ <% if w . is_suspension %>
18+ <% diff = ( ( w . suspension_end - w . created_at ) / ( 3600 * 24 ) ) . to_i %>
19+ < span class ="badge is-tag is-red is-filled "> Suspension</ span > (<%= diff %> d)
20+ <% else %>
21+ < span class ="badge is-tag is-muted "> Warning</ span >
22+ <% end %>
23+ </ td >
24+ < td >
25+ <%= user_link w . author %>
26+ </ td >
27+ < td >
28+ <%= raw ( sanitize ( render_markdown ( w . body ) , scrubber : scrubber ) ) %>
29+ </ td >
30+ < td >
31+ <% if w . suspension_active? %>
32+ < strong > Current</ strong >
33+ <%= form_tag lift_mod_warning_url ( @user . id ) , method : :post do %>
34+ <%= submit_tag '(lift)' , class : 'link is-red' %>
35+ <% end %>
36+ <% elsif w . active %>
37+ < strong > Unread</ strong >
38+ <% elsif w . read %>
39+ Read
40+ <% else %>
41+ < strong > Lifted</ strong >
42+ <% end %>
43+ </ td >
1044 </ tr >
11- <% @warnings . each do |w | %>
12- < tr >
13- < td >
14- < span title ="<%= w . created_at . iso8601 %> "> <%= time_ago_in_words ( w . created_at ) %> ago</ span >
15- </ td >
16- < td >
17- <% if w . is_suspension %>
18- <% diff = ( ( w . suspension_end - w . created_at ) / ( 3600 * 24 ) ) . to_i %>
19- < span class ="badge is-tag is-red is-filled "> Suspension</ span > (<%= diff %> d)
20- <% else %>
21- < span class ="badge is-tag is-muted "> Warning</ span >
22- <% end %>
23- </ td >
24- < td >
25- <%= user_link w . author %>
26- </ td >
27- < td >
28- <%= raw ( sanitize ( render_markdown ( w . body ) , scrubber : scrubber ) ) %>
29- </ td >
30- < td >
31- <% if w . suspension_active? %>
32- < strong > Current</ strong >
33- <%= form_tag lift_mod_warning_url ( @user . id ) , method : :post do %>
34- <%= submit_tag '(lift)' , class : 'link is-red' %>
35- <% end %>
36- <% elsif w . active %>
37- < strong > Unread</ strong >
38- <% elsif w . read %>
39- Read
40- <% else %>
41- < strong > Lifted</ strong >
42- <% end %>
43- </ td >
44- </ tr >
45- <% end %>
46- </ table >
45+ <% end %>
46+ </ table >
0 commit comments