|
| 1 | +<% content_for :title, 'Moderate Spam Profiles' %> |
| 2 | + |
| 3 | +<h1>Spam Profiles</h1> |
| 4 | +<p> |
| 5 | + These are user accounts which have been automatically identified as potential spam based on the account's |
| 6 | + characteristics. Review the list and place a tick against those that are spam, then click Handle to block and delete. |
| 7 | +</p> |
| 8 | + |
| 9 | +<div class="flex-row space-between"> |
| 10 | + <div class="button-list is-gutterless"> |
| 11 | + <button type="button" class="button is-muted is-outlined js-bulk-check" data-check="all">Tick all</button> |
| 12 | + <button type="button" class="button is-muted is-outlined js-bulk-check" data-check="none">Clear all</button> |
| 13 | + </div> |
| 14 | + <div class="button-list is-gutterless"> |
| 15 | + <%= link_to '24 hours', |
| 16 | + query_url(period: 'day'), |
| 17 | + class: "button is-muted is-outlined#{' is-active' if params[:period] == 'day'}" %> |
| 18 | + <%= link_to '7 days', |
| 19 | + query_url(period: 'week'), |
| 20 | + class: "button is-muted is-outlined#{' is-active' if params[:period] == 'week'}" %> |
| 21 | + <%= link_to '30 days', |
| 22 | + query_url(period: 'month'), |
| 23 | + class: "button is-muted is-outlined#{' is-active' if params[:period].blank? || params[:period] == 'month'}" %> |
| 24 | + </div> |
| 25 | +</div> |
| 26 | + |
| 27 | +<%= form_tag mod_handle_spammers_path, method: :post, class: 'js-spammer-form' do %> |
| 28 | + <% @users.each do |user| %> |
| 29 | + <div class="widget"> |
| 30 | + <div class="widget--body"> |
| 31 | + <%= render 'users/common_card', user: user %> |
| 32 | + <pre><%= user.profile_markdown.first(1000) %></pre> |
| 33 | + </div> |
| 34 | + <div class="widget--footer check-group-horizontal check-group__right"> |
| 35 | + <%= label_tag "spammer_#{user.id}", 'Spammer?', class: 'form-element' %> |
| 36 | + <%= check_box_tag "spam_ids[]", user.id, id: "spammer_#{user.id}", class: 'checkbox__large' %> |
| 37 | + </div> |
| 38 | + </div> |
| 39 | + <% end %> |
| 40 | + |
| 41 | + <% if @users.empty? %> |
| 42 | + <p class="has-font-size-display has-text-align-center"><i class="fas fa-virus-slash"></i></p> |
| 43 | + <p class="has-text-align-center">Yay! No spammers here.</p> |
| 44 | + <% end %> |
| 45 | + |
| 46 | + <div class="actions"> |
| 47 | + <button type="submit" class="button is-filled is-danger" <%= 'disabled' if @users.empty? %>>Handle</button> |
| 48 | + </div> |
| 49 | +<% end %> |
0 commit comments