                 {@render_sort_link("name", "Name")}
             </Col>
         </Row>
-
-ShareButton = rclass
-    propTypes:
-        id       : rtypes.string
-        on_click : rtypes.func.isRequired
-
-    render: ->
-        <span><Space/><Space/>
-            <div
-                onClick = {@props.on_click}
-                style   = {color:'rgb(102, 102, 102)', display:'inline'}
-            >
-                Private
-            </div>
-        </span>
-
-PublicButton = rclass
-    propTypes:
-        id       : rtypes.string
-        on_click : rtypes.func.isRequired
-
-    render: ->
-        <span><Space/>
-            <Button
-                bsStyle = 'info'
-                bsSize  = 'xsmall'
-                onClick = {@props.on_click}
-            >
-                <Icon name='bullhorn' /> <span className='hidden-xs'>Public</span>
-            </Button>
-        </span>
-
-CopyButton = rclass
-    propTypes:
-        on_click : rtypes.func.isRequired
-
-    render: ->
-        <span><Space/>
-            <Button
-                bsStyle = 'info'
-                bsSize  = 'xsmall'
-                onClick = {@props.on_click}
-            >
-                <Icon name='files-o' /> <span className='hidden-xs'>Copy</span>
-            </Button>
-        </span>
-generate_on_share_click = (full_path, actions) =>
+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()
-        actions.set_all_files_unchecked()
-        actions.set_file_checked(full_path, true)
-        actions.set_file_action('share')
-
-generate_on_copy_click = (full_path, actions) =>
-    (e) =>
-        e.preventDefault()
-        e.stopPropagation()
-        actions.set_file_checked(full_path, true)
-        actions.set_file_action('copy')
+        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'

    render_public_file_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_public_directory_info: ->
        if @props.public_view
            <CopyButton
                on_click = {generate_click_for('copy', @full_path(), @props.actions)}
            />
        else if @props.is_public
            <PublicButton
                on_click = {generate_click_for('share', @full_path(), @props.actions)}
            />
        else
            <ShareButton
                on_click = {generate_click_for('share', @full_path(), @props.actions)}
            />

    full_path: ->
