2019-08-05 17:54:29 +00:00
|
|
|
- content_for :page_title do
|
|
|
|
= "##{@tag.name}"
|
|
|
|
|
2019-08-07 18:20:39 +00:00
|
|
|
.dashboard__counters
|
|
|
|
%div
|
|
|
|
= link_to web_url("timelines/tag/#{@tag.name}") do
|
|
|
|
.dashboard__counters__num= number_with_delimiter @accounts_today
|
|
|
|
.dashboard__counters__label= t 'admin.tags.accounts_today'
|
|
|
|
%div
|
|
|
|
%div
|
|
|
|
.dashboard__counters__num= number_with_delimiter @accounts_week
|
|
|
|
.dashboard__counters__label= t 'admin.tags.accounts_week'
|
|
|
|
%div
|
|
|
|
= link_to explore_hashtag_path(@tag) do
|
|
|
|
.dashboard__counters__num= number_with_delimiter @tag.accounts_count
|
|
|
|
.dashboard__counters__label= t 'admin.tags.directory'
|
|
|
|
|
|
|
|
%hr.spacer/
|
|
|
|
|
2019-08-05 17:54:29 +00:00
|
|
|
= simple_form_for @tag, url: admin_tag_path(@tag.id) do |f|
|
|
|
|
= render 'shared/error_messages', object: @tag
|
|
|
|
|
|
|
|
.fields-group
|
|
|
|
= f.input :name, wrapper: :with_block_label
|
|
|
|
|
|
|
|
.fields-group
|
|
|
|
= f.input :usable, as: :boolean, wrapper: :with_label
|
2019-08-07 14:13:34 +00:00
|
|
|
= f.input :trendable, as: :boolean, wrapper: :with_label, disabled: !Setting.trends
|
|
|
|
= f.input :listable, as: :boolean, wrapper: :with_label, disabled: !Setting.profile_directory
|
2019-08-05 17:54:29 +00:00
|
|
|
|
|
|
|
.actions
|
|
|
|
= f.button :button, t('generic.save_changes'), type: :submit
|
2019-08-07 18:20:39 +00:00
|
|
|
|
|
|
|
%hr.spacer/
|
|
|
|
|
|
|
|
%h3= t 'admin.tags.breakdown'
|
|
|
|
|
|
|
|
.table-wrapper
|
|
|
|
%table.table
|
|
|
|
%tbody
|
2019-09-03 05:59:52 +00:00
|
|
|
- total = @usage_by_domain.sum(&:last).to_f
|
2019-09-01 17:44:05 +00:00
|
|
|
|
2019-08-07 18:20:39 +00:00
|
|
|
- @usage_by_domain.each do |(domain, count)|
|
|
|
|
%tr
|
|
|
|
%th= domain || site_hostname
|
2019-09-01 17:44:05 +00:00
|
|
|
%td= number_to_percentage((count / total) * 100, precision: 1)
|
2019-08-07 18:20:39 +00:00
|
|
|
%td= number_with_delimiter count
|