{% extends 'TopxiaWebBundle::bootstrap-modal-layout.html.twig' %}

{% block title %}个人详细信息{% endblock %}

{% block body %}

<table class="table table-striped table-condenseda table-bordered">
	{% if userinfoFields %}
	{% for field in userinfoFields %}
		{% if field == 'truename' %}
		<tr>
			<th width="25%">姓名</th>
			<td>
				{% if profile.truename %}
					{{ profile.truename }}
				{% else %}
					暂无
				{% endif %}
			</td>
		</tr>
		{% elseif field == 'gender' %}
		<tr>
			<th width="25%">性别</th>
			{% if profile.gender == 'male' %}
				<td>男</td>
			{% elseif profile.gender == 'female' %}
				<td>女</td>
			{% elseif profile.gender == 'secret' %}
				<td>暂无</td>
			{% endif %}
		</tr>
		{% elseif field == 'job' %}
		<tr>
			<th width="25%">职业</th>
			<td>
				{% if profile.job %}
					{{ profile.job }}
				{% else %}
					暂无
				{% endif %}
			</td>
		</tr>
		{% elseif field == 'company' %}
		<tr>
			<th width="25%">公司</th>
			<td>
				{% if profile.company %}
					{{ profile.company }}
				{% else %}
					暂无
				{% endif %}
			</td>
		</tr>
		{% elseif field == 'mobile' %}
		<tr>
			<th>手机号码</th>
			<td>
				{% if profile.mobile %}
					{{ profile.mobile }}
				{% else %}
					暂无
				{% endif %}
			</td>
		</tr>
		{% elseif field == 'title' %}
		<tr>
			<th>头衔</th>
			<td>
				{% if profile.title %}
					{{ profile.title }}
				{% else %}
					暂无
				{% endif %}
			</td>
		</tr>
		{% elseif field == 'signature' %}
		<tr>
			<th>个人签名</th>
			<td>
				{% if profile.signature %}
					{{ profile.signature }}
				{% else %}
					暂无
				{% endif %}
			</td>
		</tr>
		{% elseif field == 'about' %}
		<tr>
			<th>自我介绍</th>
			<td>
				{% if profile.about %}
					{{ profile.about }}
				{% else %}
					暂无
				{% endif %}
			</td>
		</tr>
		{% elseif field == 'weibo' %}
		<tr>
			<th>微博</th>
			<td>
				{% if profile.weibo %}
					{{ profile.weibo }}
				{% else %}
					暂无
				{% endif %}
			</td>
		</tr>
		{% elseif field == 'weixin' %}
		<tr>
			<th>微信</th>
			<td>
				{% if profile.weixin %}
					{{ profile.weixin }}
				{% else %}
					暂无
				{% endif %}
			</td>
		</tr>
		{% elseif field == 'qq' %}
		<tr>
			<th>QQ</th>
			<td>
				{% if profile.qq %}
					{{ profile.qq }}
				{% else %}
					暂无
				{% endif %}
			</td>
		</tr>
		{% endif %}
	{% for userField in userFields %}
		{% if field == userField.fieldName %}
		<tr>
			<th>{{userField.title}}</th>
			<td>
				{% if profile[userField.fieldName] %}
					{{ profile[userField.fieldName] }}
				{% else %}
					暂无
				{% endif %}
			</td>
		</tr>
		{% endif %}
	{% endfor %}
	{% endfor %}
	{% endif %}

</table>

{% endblock %}

{% block footer %}
		<button type="button" class="btn btn-primary" data-dismiss="modal">关闭</button>
{% endblock %}