         </li>
       </Dropdown.Menu>
     </Dropdown>
-    {if tags.length
-      <TagEdit tags={tags} rootClassName="tagGather push-down"
-       className="label label-default"
-       href={(tag) -> changeSortLink sortBy, "tag.#{tag.key}"}>
-        {'Gather by tag '}
-        <span className="caret"/>
-      </TagEdit>
-    }
     <div className="btn-group">
       <TextTooltip title="Show all messages you have authored or been @mentioned in">
         <a className="btn btn-default myPostsButton #{unless user? then 'disabled'}"

changeSortLink = (sortBy, key) ->
  reverse = key of columnReverse
  ## Remove this sort if it exists, to move it to the beginning.
  newSortBy =
    for sort, i in sortBy
      if sort.key == key
        ## If this was already the first sort, reverse it.
        reverse = not sort.reverse if i == 0
        continue
      else
        sort
  ## New sort at the beginning
  newSortBy.splice 0, 0, {key, reverse}
  linkToSort newSortBy

Template.registerHelper 'groups', ->

  for sort in sortBy
    if sort.key.startsWith 'tag.'
      groupBy.push sort.key[4..]
    else
      break
  groupBy = null unless groupBy.length

  <table className="table table-striped">
