{% import "macro.html.twig" as web_macro %}

{% set showPaginator = showPaginator|default(1) %}
{% set showRefererName = showRefererName|default(0) %}
<style type="text/css">
.overflow-hidden{
	height: 24px;
    overflow: hidden;
    display: inline-block;
}
</style>
<table class="table table-hover" style="word-break:break-all;table-layout: fixed;">
	<thead>
		<tr>
			<th width="50%">来源</th>
			<th width="30%">来源数</th>
			<th width="20%">占比</th>
		{#	<th>购买转化数</th>
			<th>购买转化率</th>#}
		</tr>
	</thead>
	<tbody>
		{% for refererlog in refererloglist %}
			<tr>
				<th scope="row">
					{% if showRefererName %}{{ refererlog.refererName }} {% else %}
						<a   class="overflow-hidden" href="javascript:;" id="help" data-toggle="popover" data-trigger="click" data-placement="top" title="" data-html="true" data-content="<a>{{ refererlog.refererUrl }}</a>" data-original-title="访问地址:">{{refererlog.refererUrl}}</a>
					{% endif %}
				</th>
				<th>{{refererlog.count}}</th>
				<th>{{refererlog.percent}}</th>
				{#<th>{{refererlog.orderCount}}</th>
				<th>{{refererlog.orderPercent}}</th>#}
			</tr>
			{% else %} 
			  <tr><td colspan="20"><div class="empty">暂无记录</div></td></tr>
		{% endfor %}
	</tbody>
</table>

{% if showPaginator %}
	{{web_macro.paginator(paginator)}}
	<input id="pageinator-url"  type="hidden" value="{{path('admin_opencourse_analysis_referer_detail_list',{id:targetId})}}">
{% endif %}
