                 i className: 'icon-x'
           else if @props.model instanceof Folder
             Link {
+              ref: 'nameLink'
               to: 'folder'
               className: 'media'
               params: {splat: @props.model.urlPath()}

    startEditingName: ->
      @setState editing: true, @focusNameInput

    focusNameInput: ->
      @refs.newName.getDOMNode().focus()

    saveNameEdit: ->
      @props.model.save(name: @refs.newName.getDOMNode().value)
      @setState(editing: false)

    cancelEditingName: ->
      @props.model.collection.remove(@props.model) if @props.model.isNew()
      @setState(editing: false)

    getAttributesForRootNode: ->
      attrs =

              span className: 'media-body',
                @props.model.displayName()
          else
            a {
              href: @props.model.get('url')
              className: 'media'
              ref: 'nameLink'
            },
              span className: 'pull-left',
                FilesystemObjectThumbnail(model: @props.model)
              span className: 'media-body',
