app/views/accounts/downvoted.html.haml
= render partial: 'nav'
.card.border-top-0{style: 'padding-top: 0'}
.card-block
.row
.col-md-12
- if suggested_voters.any?
%strong Today's top downvoters (by nominal votes):
- suggested_voters.each do |voter|
- tip = pluralize(voter.values.last, 'vote')
= link_to voter.keys.first, accounts_path(downvoted: true, account_names: voter.keys.first), class: 'btn btn-secondary btn-xs', uib_tooltip: tip, title: tip
%br
%div.float-right
= form_tag accounts_path, method: :get do
= hidden_field_tag :downvoted, true
Downvoters:
= text_field_tag :account_names, @account_names, size: 50
= submit_tag 'Query', class: 'btn btn-primary'
%br
%br
- if accounts.any?
%h3
Downvoted #{pluralize accounts.size, 'Account'}
- if !!@oldest_vote
= surround '(', ')' do
since
= time_ago_in_words @oldest_vote
ago
- if votes_today.any?
%small
= votes_today.join('; ')
today
%br
%code= accounts.join(' ')
%br
= link_to 'Download List', accounts_path(downvoted: true, account_names: @account_names, format: :text), class: 'btn btn-primary'
See:
=link_to 'How to Get Voting Lists with Ruby', 'https://steemit.com/radiator/@inertia/how-to-get-voting-lists-with-ruby'