             description_text : ''
             error            : ''
 
+    toggle_editing: ->
+        if @state.state == 'view'
+            @start_editing()
+        else
+            @cancel_editing()
+
     create_project : ->
         token = misc.uuid()
         @setState(state:'saving')

        show_deleted_button : false

    render_deleted_button : ->
        if @props.show_deleted_button
            <Button onClick = {=>redux.getActions('projects').setState(deleted: not @props.deleted)}>
                <Icon name={if @props.deleted then 'check-square-o' else 'square-o'} fixedWidth /> Deleted
            </Button>
        else
            return null

    render_hidden_button : ->
        if @props.show_hidden_button
            <Button onClick = {=>redux.getActions('projects').setState(hidden: not @props.hidden)}>
                <Icon name={if @props.hidden then 'check-square-o' else 'square-o'} fixedWidth /> Hidden
            </Button>


            </Row>

            <Row>
                <Col sm=5>
                    <ButtonToolbar>
                        <Button
                            disabled = {@state.title_text == '' or @state.state == 'saving'}
                            bsStyle  = 'success'
                            onClick  = {@create_project} >
                            Create project
                        </Button>
