Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
| Download
Views: 39598
1
##############################################################################
2
#
3
# CoCalc: Collaborative Calculation in the Cloud
4
#
5
# Copyright (C) 2016 -- 2017, Sagemath Inc.
6
#
7
# This program is free software: you can redistribute it and/or modify
8
# it under the terms of the GNU General Public License as published by
9
# the Free Software Foundation, either version 3 of the License, or
10
# (at your option) any later version.
11
#
12
# This program is distributed in the hope that it will be useful,
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
# GNU General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License
17
# along with this program. If not, see <http://www.gnu.org/licenses/>.
18
#
19
##############################################################################
20
21
{React, rclass, rtypes} = require('../smc-react')
22
{Button, ButtonToolbar, Panel, Well} = require('react-bootstrap')
23
{Icon} = require('../r_misc')
24
25
exports.DeleteStudentsPanel = rclass
26
propTypes:
27
delete : rtypes.func.isRequired
28
29
getInitialState: ->
30
delete_student_projects_confirm : false
31
32
render_confirm_delete_student_projects: ->
33
<Well style={marginTop:'10px'}>
34
All student projects will be deleted. Are you absolutely sure?
35
<ButtonToolbar style={marginTop:'10px'}>
36
<Button bsStyle='danger' onClick={=>@setState(delete_student_projects_confirm:false); @props.delete()}>YES, DELETE all Student Projects</Button>
37
<Button onClick={=>@setState(delete_student_projects_confirm:false)}>Cancel</Button>
38
</ButtonToolbar>
39
</Well>
40
41
render: ->
42
<Panel header={<h4><Icon name='trash'/> Delete all student projects</h4>}>
43
<Button bsStyle='danger' onClick={=>@setState(delete_student_projects_confirm:true)}><Icon name="trash"/> Delete all Student Projects...</Button>
44
{@render_confirm_delete_student_projects() if @state.delete_student_projects_confirm}
45
<hr/>
46
<span style={color:'#666'}>
47
If for some reason you would like to delete all the student projects
48
created for this course, you may do so by clicking below.
49
Be careful!
50
</span>
51
</Panel>
52
53