- content_for :title do
  Tag use in Gerrit over past #{pluralize @days, 'day'}
  %small
    %span{day_links}

%section{ data: { view: 'Tags', authors: h(@authors.to_json) } }
  %h2 Global tag use
  #global-used= haml :'shared/progress'

  %h2 Per-author tag use
  - @authors.each do |author|
    %h3&= author
    %ul.nav.nav-tabs{ data: { tabs: 'tabs' } }
      %li.active
        %a{ href: "##{name_to_id author}-used", data: { toggle: 'tab' } } Used
      %li
        %a{ href: "##{name_to_id author}-received", data: { toggle: 'tab' } } Received

    .tab-content
      .tab-pane.active{ id: "#{name_to_id author}-used" }
      .tab-pane{ id: "#{name_to_id author}-received" }

- content_for :title do
  Tag use in Gerrit over past #{pluralize @days, 'day'}
  %small
    %span{day_links}

%section{ data: { view: 'Tags', authors: h(@authors.to_json) } }
  %h2 Global tag use
  #global-used= haml :'shared/progress'

  %h2 Per-author tag use
  - @authors.each do |author|
    %h3&= author
    %ul.nav.nav-tabs{ data: { tabs: 'tabs' } }
      - if @stats[:from][author].any?
        %li.active
          %a{ href: "##{name_to_id author}-used", data: { toggle: 'tab' } } Used
      - if @stats[:to][author].any?
        %li{ class: ('active' unless @stats[:from][author].any?) }
          %a{ href: "##{name_to_id author}-received", data: { toggle: 'tab' } } Received

    .tab-content
      - if @stats[:from][author].any?
        .tab-pane.active{ id: "#{name_to_id author}-used" }
      - if @stats[:to][author].any?
        .tab-pane{ class: ('active' unless @stats[:from][author].any?), id: "#{name_to_id author}-received" }

Hide word cloud panes if they wouldn't have any content in them
Hide word cloud panes if they wouldn't have any content in them

Change-Id: Ibc3ed112cab0492aa50aae4e08edf58e631da74d
Reviewed-on: https://gerrit.causes.com/27207
Reviewed-by: Greg Hurrell <79e2475f81a6317276bf7cbb3958b20d289b78df@causes.com>
Tested-by: Greg Hurrell <79e2475f81a6317276bf7cbb3958b20d289b78df@causes.com>
