The code powering m.abunchtell.com https://m.abunchtell.com
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 

53 linhas
1.7 KiB

  1. - content_for :page_title do
  2. = "##{@tag.name}"
  3. .dashboard__counters
  4. %div
  5. = link_to tag_url(@tag), target: '_blank', rel: 'noopener' do
  6. .dashboard__counters__num= number_with_delimiter @accounts_today
  7. .dashboard__counters__label= t 'admin.tags.accounts_today'
  8. %div
  9. %div
  10. .dashboard__counters__num= number_with_delimiter @accounts_week
  11. .dashboard__counters__label= t 'admin.tags.accounts_week'
  12. %div
  13. - if @tag.accounts_count > 0
  14. = link_to explore_hashtag_path(@tag) do
  15. .dashboard__counters__num= number_with_delimiter @tag.accounts_count
  16. .dashboard__counters__label= t 'admin.tags.directory'
  17. - else
  18. %div
  19. .dashboard__counters__num= number_with_delimiter @tag.accounts_count
  20. .dashboard__counters__label= t 'admin.tags.directory'
  21. %hr.spacer/
  22. = simple_form_for @tag, url: admin_tag_path(@tag.id) do |f|
  23. = render 'shared/error_messages', object: @tag
  24. .fields-group
  25. = f.input :name, wrapper: :with_block_label
  26. .fields-group
  27. = f.input :usable, as: :boolean, wrapper: :with_label
  28. = f.input :trendable, as: :boolean, wrapper: :with_label, disabled: !Setting.trends
  29. = f.input :listable, as: :boolean, wrapper: :with_label, disabled: !Setting.profile_directory
  30. .actions
  31. = f.button :button, t('generic.save_changes'), type: :submit
  32. %hr.spacer/
  33. %h3= t 'admin.tags.breakdown'
  34. .table-wrapper
  35. %table.table
  36. %tbody
  37. - total = @usage_by_domain.sum(&:last).to_f
  38. - @usage_by_domain.each do |(domain, count)|
  39. %tr
  40. %th= domain || site_hostname
  41. %td= number_to_percentage((count / total) * 100, precision: 1)
  42. %td= number_with_delimiter count