 {React, rclass, rtypes}  = require('./smc-react')
 {Loading, r_join, Space, Footer} = require('./r_misc')
 misc = require('smc-util/misc')
-{Button, Row, Col, Well, Panel, ProgressBar} = require('react-bootstrap')
+{Button, ButtonToolbar, Row, Col, Well, Panel, ProgressBar} = require('react-bootstrap')
 {HelpEmailLink, SiteName, PolicyPricingPageUrl} = require('./customize')
 
 {PROJECT_UPGRADES} = require('smc-util/schema')

                {@render_upgrades()}
                {@render_upgraded_projects()}
                <Footer/>
            </div>
            i += 1
            @render_upgraded_project(project_id, upgrades, i%2==0)

    confirm_reset: (e) ->
        console.log "TODO: Actually remove all upgrades"
        @setState(expand_reset_all_projects:false)

    render_header: ->
        <div>
            <Row>
                <Col sm=12 style={display:'flex'} >
                    <h4 style={flex:'1'} >Upgrades you have applied to projects</h4>
                    <Button onClick={=>@setState(expand_reset_all_projects:true)} disabled={@state.expand_reset_all_projects}>
                        Reset all project upgrades...
                    </Button>
                </Col>
            </Row>
            {<Row>
                <Col sm=12>
                    <ResetProjectsConfirmation
                        on_confirm = {@confirm_reset}
                        on_cancel  = {=>@setState(expand_reset_all_projects:false)}
                    />
                </Col>
            </Row> if @state.expand_reset_all_projects}
        </div>

    render_upgraded_projects: ->
        upgraded_projects = @props.redux.getStore('projects').get_projects_upgraded_by()
        if not misc.len(upgraded_projects)
            return
        <Panel header={@render_header()}>
            <Row key='header'>
                <Col sm=4>
                    <strong>Project</strong>
