File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 317317 <% end %>
318318 <% end %>
319319 <% end %>
320- <% if check_your_privilege ( 'flag_curate' ) %>
320+ <% if current_user &. can_handle_flags? %>
321321 < a href ="javascript:void(0) "
322322 data-modal ="#mod-tools- <%= post . id %> "
323323 class ="tools--item "
326326 < i class ="fa fa-wrench "> </ i >
327327 Tools
328328 </ a >
329- <% flags_count = Flag . accessible_to ( current_user , post ) . where ( handled_by_id : nil ) . count %>
329+ <% flags_count = Flag . accessible_to ( current_user , post ) . unhandled . count %>
330330
331331 <% own_flags_count = if current_user &.at_least_moderator?
332332 0
333333 else
334- post . flags . not_confidential . where ( user : current_user , handled_by_id : nil ) . count
334+ post . flags . not_confidential . where ( user : current_user ) . unhandled . count
335335 end %>
336336
337337 <% if flags_count > 0 %>
350350 <%= render 'posts/close_modal' , post : post %>
351351 <% end %>
352352
353- <% if current_user &.privilege? ( 'flag_curate' ) %>
353+ <% if current_user &.can_handle_flags? %>
354354 < div class ="post--action-dialog js-flags ">
355355 < div class ="widget ">
356356 < div class ="widget--header "> Flags on this post</ div >
357- <% post . flags . where ( handled_by_id : nil ) . each do |flag | %>
357+ <% post . flags . unhandled . each do |flag | %>
358358 <% next if !current_user . at_least_moderator? && ( flag . post_flag_type . nil? || flag . post_flag_type . confidential ) %>
359359 <% next if !current_user . at_least_moderator? && ( current_user . id == flag . user . id ) %>
360360 < div class ="widget--body ">
You can’t perform that action at this time.
0 commit comments