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

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

{% block body %}

<table class="table table-striped table-condenseda table-bordered">
	<tr>
		<th width="25%">用户名</th>
		<td width="75%">
			<a class="pull-right" href="{{ path('user_show', {id:user.id}) }}" target="_blank">个人主页</a>
			{{ user.nickname }}
		</td>
	</tr>

	<tr>
		<th>Email</th>
		<td>{{ user.email }}</td>
	</tr>

	<tr>
		<th>姓名</th>
		<td>
			{% if profile.truename %}
				{{ profile.truename }}
			{% else %}
				暂无
			{% endif %}
		</td>
	</tr>

	<tr>
		<th>姓别</th>
		<td>
			{% if profile.gender == 'mail' %}
				男
			{% elseif profile.gender == 'femail' %}
				女
			{% else %}
				暂无
			{% endif %}
		</td>
	</tr>

	<tr>
		<th>公司</th>
		<td>
			{% if profile.company %}
				{{ profile.company }}
			{% else %}
				暂无
			{% endif %}
		</td>
	</tr>

	<tr>
		<th>职业</th>
		<td>
			{% if profile.job %}
				{{ profile.job }}
			{% else %}
				暂无
			{% endif %}
		</td>
	</tr>

	<tr>
		<th>头衔</th>
		<td>
		{% if profile.title %}
				{{ profile.title }}
			{% else %}
				暂无
			{% endif %}
		</td>
	</tr>

	<tr>
		<th>电话</th>
		<td>
		{% if profile.mobile %}
				{{ profile.mobile }}
			{% else %}
				暂无
			{% endif %}
		</td>
	</tr>

	<tr>
		<th>个人签名</th>
		<td>
		{% if profile.signature %}
				{{ profile.signature }}
			{% else %}
				暂无
			{% endif %}
		</td>
	</tr>

	<tr>
		<th>自我介绍</th>
		<td>
		{% if profile.about %}
				{{ profile.about | raw }}
			{% else %}
				暂无
			{% endif %}
		</td>
	</tr>

	<tr>
		<th>个人网站</th>
		<td>
			{% if profile.site %}
				{{ profile.site }}
			{% else %}
				暂无
			{% endif %}
		</td>
	</tr>

	<tr>
		<th>微博</th>
		<td>
			{% if profile.weibo %}
				{{ profile.weibo }}
			{% else %}
				暂无
			{% endif %}
		</td>
	</tr>

	<tr>
		<th>微信</th>
		<td>
			{% if profile.weixin %}
				{{ profile.weixin }}
			{% else %}
				暂无
			{% endif %}
		</td>
	</tr>

	<tr>
		<th>QQ</th>
		<td>
			{% if profile.qq %}
				{{ profile.qq }}
			{% else %}
				暂无
			{% endif %}
		</td>
	</tr>	
{% if userFields %}
	{% for userField in userFields %}
	<tr>
		<th width="25%">{{userField.title}}</th>
		<td>
			{% if profile[userField.fieldName] %}
				{% if userField.type=="date"%}
					{{ profile[userField.fieldName]|date("Y-m-d") }}
				{% else %}
					{{ profile[userField.fieldName] }}
				{% endif %}
		  {% else %}
				暂无
		  {% endif %}
		</td>
	</tr>
  {% endfor %}
  {% endif %}
  </table>
</table>

{% endblock %}

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