@@ -13,7 +13,6 @@ const GridCard = require('../../misc/GridCard');
1313const { Button, Glyphicon} = require ( 'react-bootstrap' ) ;
1414const Message = require ( '../../../components/I18N/Message' ) ;
1515
16-
1716// const ConfirmModal = require('./modals/ConfirmModal');
1817
1918require ( './style/usercard.css' ) ;
@@ -24,6 +23,8 @@ class UserCard extends React.Component {
2423 style : PropTypes . object ,
2524 user : PropTypes . object ,
2625 innerItemStyle : PropTypes . object ,
26+ avatarStyle : PropTypes . object ,
27+ nameStyle : PropTypes . object ,
2728 actions : PropTypes . array
2829 } ;
2930
@@ -34,8 +35,24 @@ class UserCard extends React.Component {
3435 backgroundPosition : "center" ,
3536 backgroundRepeat : "repeat-x"
3637 } ,
37- innerItemStyle : { "float" : "left" ,
38+ innerItemStyle : {
39+ position : "relative" ,
40+ marginTop : "35px" ,
41+ marginLeft : "10px" ,
42+ marginRight : "10px" ,
43+ maxHeight : "85px"
44+ } ,
45+ avatarStyle : {
3846 margin : "10px"
47+ } ,
48+ nameStyle : {
49+ position : "absolute" ,
50+ left : "80px" ,
51+ top : "30px" ,
52+ width : "75%" ,
53+ borderBottom : "1px solid #ddd" ,
54+ fontSize : 18 ,
55+ fontWeight : "bold"
3956 }
4057 } ;
4158
@@ -65,25 +82,29 @@ class UserCard extends React.Component {
6582 } ;
6683
6784 renderAvatar = ( ) => {
68- return ( < div key = "avatar" className = "avatar-containter" style = { this . props . innerItemStyle } > < Button bsStyle = "primary" type = "button" className = "square-button" >
85+ return ( < div key = "avatar" className = "avatar-containter" style = { this . props . avatarStyle } > < Button bsStyle = "primary" type = "button" className = "square-button" >
6986 < Glyphicon glyph = "user" />
7087 </ Button > </ div > ) ;
7188 } ;
7289
90+ renderName = ( ) => {
91+ return ( < div key = "name" style = { this . props . nameStyle } > { this . props . user . name } </ div > ) ;
92+ } ;
93+
7394 render ( ) {
7495 return (
7596 < GridCard className = "user-thumb" style = { this . props . style } header = { this . props . user . name }
7697 actions = { this . props . actions }
7798 >
7899 < div className = "user-data-container" >
79100 { this . renderAvatar ( ) }
101+ { this . renderName ( ) }
80102 { this . renderRole ( ) }
81103 { this . renderGroups ( ) }
82104 </ div >
83- { this . renderStatus ( ) }
105+ { this . renderStatus ( ) }
84106 </ GridCard >
85107 ) ;
86108 }
87109}
88-
89110module . exports = UserCard ;
0 commit comments