-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathitemAssignment.js
94 lines (85 loc) · 2.16 KB
/
itemAssignment.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/**
* Created by zhanjiyuan on 15/11/8.
*/
'use strict';
var React = require('react-native');
var {
StyleSheet,
Text,
View,
} = React;
var ItemDeadline = require('./itemDeadline');
var ItemAssignment = React.createClass({
render: function() {
return (
<View style={styles.container}>
<Text style={styles.class}>{this.props.data.class}</Text>
<Text style={styles.deadline}>{'Deadline: ' + this.props.data.deadline}</Text>
<Text style={styles.description}>{this.props.data.description}</Text>
<View style={styles.materials}>
<Text style={styles.title}>{'ssh'}</Text>
<Text style={styles.content}>{this.props.data.ssh_url_to_repo}</Text>
</View>
<View style={styles.materials}>
<Text style={styles.title}>{'http'}</Text>
<Text style={styles.content}>{this.props.data.http_url_to_repo}</Text>
</View>
<View style={styles.materials}>
<Text style={styles.title}>{'web'}</Text>
<Text style={styles.content}>{this.props.data.web_url}</Text>
</View>
</View>
);
}
});
var styles = StyleSheet.create({
container:{
marginTop: 60,
padding:20,
},
class:{
paddingTop: 10,
paddingBottom: 5,
fontWeight: 'bold',
fontSize: 16,
},
description:{
padding: 10,
backgroundColor: '#AAAAAA',
borderRadius: 3,
fontSize: 14,
},
deadline:{
fontWeight:'bold',
paddingBottom: 20,
fontSize: 13,
color: '##FF3B30',
},
materials:{
paddingTop:5,
paddingBottom:5,
},
content:{
fontSize: 10,
padding:10,
backgroundColor: '#DDDDDD',
borderRadius:3,
},
title:{
fontSize: 16,
fontWeight: 'bold',
padding:10,
}
});
module.exports = ItemAssignment;
//var testdata = {
// "description": "Android界面跳转",
//
// "ssh_url_to_repo": "[email protected]:SOFT130067.01-2015/lab2.git",
// "http_url_to_repo": "https://git.fdu13ss.org/SOFT130067.01-2015/lab2.git",
// "web_url": "https://git.fdu13ss.org/SOFT130067.01-2015/lab2",
// "name": "lab2",
//
// "deadline": "2015-11-05T23:59:59.000Z",
// "class": "智能移动平台应用开发-2015",
//};