Blame view
imports/client/views/org/admin/students/StudentTable.js
2.91 KB
7aa6f173b
|
1 2 3 4 5 6 7 8 9 |
import _ from 'lodash'; import { Meteor } from 'meteor/meteor'; import React, { Component } from 'react'; import { Link,browserHistory } from 'react-router'; import { FormGroup,Panel,Table, ButtonToolbar,Modal, FormControl,Glyphicon,Button } from 'react-bootstrap'; import { AddStudentForm } from './addStudentForm'; |
b02441289
|
10 |
import {moment} from 'meteor/momentjs:moment' |
7aa6f173b
|
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
export class StudentTable extends Component { constructor(props) { super(props); this.state = { show: false }; this.onUpdate = this.onUpdate.bind(this); }; onUpdate(key, value) { this.setState({[key]: value}); }; render() { return ( <div className="panel panel-flat"> <div className="panel-heading"> <h5 className="panel-title">Student Details</h5> <div className="heading-elements"> <ul className="icons-list"> |
af71e7fcd
|
32 33 34 35 |
<li><a data-action="collapse"></a></li> <li><a data-action="reload"></a></li> </ul> </div> |
7aa6f173b
|
36 |
</div> |
7aa6f173b
|
37 38 39 40 41 |
<Table striped bordered condensed hover> <thead> <tr> <th>First Name</th> <th>Last Name</th> |
c6b4fc634
|
42 |
<th>Class</th> |
7aa6f173b
|
43 44 45 46 47 48 |
<th>DOB</th> <th>Status</th> <th className="text-center">Actions</th> </tr> </thead> <tbody> |
af71e7fcd
|
49 50 51 52 53 54 55 56 |
{ this.props.students.map(function(student, i) { return( <tr key={i}> <td>{student.firstName}</td> <td>{student.lastName}</td> <td>{student.class}</td> |
b02441289
|
57 |
<td>{student.dob? moment(student.dob).format("LL") : <span></span>}</td> |
af71e7fcd
|
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
<td><span className="label label-success">Active</span></td> <td className="text-center"> <ul className="icons-list"> <li className="dropdown"> <a href="#" className="dropdown-toggle" data-toggle="dropdown"> <i className="icon-menu9"></i> </a> <ul className="dropdown-menu dropdown-menu-right"> <li><a href="#"><i className="icon-file-pdf"></i> Export to .pdf</a></li> <li><a href="#"><i className="icon-file-excel"></i> Export to .csv</a></li> <li><a href="#"><i className="icon-file-word"></i> Export to .doc</a></li> </ul> </li> </ul> </td> </tr> ) }) } |
7aa6f173b
|
77 78 79 80 81 82 83 |
</tbody> </Table> </div> ); }; }; |