     render_public_file_info: ->
         if @props.public_view
             <CopyButton
-                on_click = {generate_on_copy_click(@full_path(), @props.actions)}
+                on_click = {generate_click_for('copy', @full_path(), @props.actions)}
             />
         else if @props.is_public
             <PublicButton
-                id       = {@props.name}
-                on_click = {generate_on_share_click(@full_path(), @props.actions)}
+                on_click = {generate_click_for('share', @full_path(), @props.actions)}
             />
         else
             <ShareButton
-                id       = {@props.name}
-                on_click = {generate_on_share_click(@full_path(), @props.actions)}
+                on_click = {generate_click_for('share', @full_path(), @props.actions)}
             />
 
     full_path: ->

    render_public_directory_info: ->
        if @props.public_view
            <CopyButton
                on_click = {generate_on_copy_click(@full_path(), @props.actions)}
            />
        else if @props.is_public
            <PublicButton
                id       = {@props.name}
                on_click = {generate_on_share_click(@full_path(), @props.actions)}
            />
        else
            <ShareButton
                id       = {@props.name}
                on_click = {generate_on_share_click(@full_path(), @props.actions)}
            />

    full_path: ->

                {@render_sort_link("name", "Name")}
            </Col>
        </Row>
ShareButton = ({on_click}) ->
    <span><Space/>
        <Button
            bsSize  = 'xsmall'
            onClick = {on_click}
            style   = {color:'rgb(102, 102, 102)'}
        >
            <Icon name='share-o' /> <span className='hidden-xs'>Share...</span>
        </Button>
    </span>

PublicButton = ({on_click}) ->
    <span><Space/>
        <Button
            bsStyle = 'info'
            bsSize  = 'xsmall'
            onClick = {on_click}
        >
            <Icon name='bullhorn' /> <span className='hidden-xs'>Public</span>
        </Button>
    </span>

CopyButton = ({on_click}) ->
    <span><Space/>
        <Button
            bsStyle = 'info'
            bsSize  = 'xsmall'
            onClick = {on_click}
        >
            <Icon name='files-o' /> <span className='hidden-xs'>Copy</span>
        </Button>
    </span>

generate_click_for = (file_action_name, full_path, project_actions) =>
    (e) =>
        e.preventDefault()
        e.stopPropagation()
        unless file_actions[file_action_name].allows_multiple_files
            project_actions.set_all_files_unchecked()
        project_actions.set_file_checked(full_path, true)
        project_actions.set_file_action(file_action_name)

FileRow = rclass
    displayName : 'ProjectFiles-FileRow'
