
.row
  .col-lg-5
  .col-lg-2
    %h1.text-center
      = gravatar_for @user
      = @user.name

    %table.table
      - @tags.each do |tag|
        %tr.active
          %td
            = tag.name
          %td
            - if @user.id != current_user.id
              - if current_user.followed_tags.include? tag

                = form_tag( {controller: :follower_tag_relationships, action: :destroy}, method: :delete, html: {class: "nifty_form"} )do

                  = hidden_field_tag :tag_id,   tag.id
                  = submit_tag "Unfollow", class: "btn btn-danger"
              - else
                = form_tag( {controller: :follower_tag_relationships, action: :create}, html: {class: "nifty_form"} )do 
                  = hidden_field_tag :tag_id,  tag.id
                  = submit_tag "Follow", class: "btn btn-primary"

      = paginate @tags


.row
  .col-lg-4
  .col-lg-4
    %h1.text-center
      = gravatar_for @user
      = @user.name

    %table.table.text-center
      %tr.active
        %th.text-center
          Tag

        %th.text-center
          Follower count
        %th.text-center
      - @tags.each do |tag|

        %tr.active
          %td
            = tag.name
          %td
            %span.badge
              = tag.followers.count

          %td
            - if @user.id != current_user.id
              - if current_user.followed_tags.include? tag

                = form_tag( {controller: :follower_tag_relationships, action: :destroy}, method: :delete, html: {class: "nifty_form"} )do

                  = hidden_field_tag :tag_id,   tag.id
                  = submit_tag "Unfollow", class: "btn btn-danger"
              - else
                = form_tag( {controller: :follower_tag_relationships, action: :create}, html: {class: "nifty_form"} )do 
                  = hidden_field_tag :tag_id,  tag.id
                  = submit_tag "Follow", class: "btn btn-primary"

      = paginate @tags

Add follower count to user page
Add follower count to user page
