<!--{<*
 * 问题索引模板
 * create time: 2011-5-14 下午03:56:36
 * @version $Id: index.tpl 216 2012-11-19 14:03:53Z liqt $
 * @author LiQintao
*>}-->
<script type="text/javascript">

$(function(){
	load_system_info();// 加载系统信息
	$("#input_search").focus();

	$(".question-thumbnails").each(function(){
		var parent = $(this);
		var q_id = parent.attr("question");
		$.get("", {m: "module_qa_question.ui_question.show_question_thumbnails", q_id: q_id}, function (msg) {
			$(".question-thumbnails[question='"+q_id+"']").prepend(msg);
			$("a.thumb-"+q_id).each(function(){
				$(this).cluetip({
					cluetipClass: 'jtip',
					width: 440,
					showTitle: true,
					sticky: false
				});
			});
		});
	});

{<if $search_keywords>}
	$(".question-main").textSearch("{<$search_keywords>}", {markColor: "#C00", nullReport: false});// 关键字着色
{</if>}
})
</script>
{<include file=$header_tpl>}

    <div class="span-17 border" id="content">
    	<div id="sub-menu" class="">
{<if $flag_question_sort_newest>}
    					<span class="active">最新问题</span>
{<else>}
						<a href="{<$link_sort_time>}">最新问题</a>
{</if>}
{<if $flag_question_sort_newanswer>}
    					<span class="active">最新回答</span>
{<else>}
						<a href="{<$link_sort_newanswer>}">最新回答</a>
{</if>}
{<if $flag_question_sort_score>}
    					<span class="active">得分最高</span>
{<else>}
						<a href="{<$link_sort_score>}">得分最高</a>
{</if>}
{<if $flag_question_sort_concerned>}
    					<span class="active">最受关注</span>
{<else>}
						<a href="{<$link_sort_concerned>}">最受关注</a>
{</if>}
{<if $flag_question_sort_unanswer>}
    					<span class="active">等待回答</span>
{<else>}
						<a href="{<$link_sort_unanswer>}">等待回答</a>
{</if>}
{<if $flag_question_sort_answer>}
    					<span class="active">答案最多</span>
{<else>}
						<a href="{<$link_sort_answer>}">答案最多</a>
{</if>}
{<if $flag_question_sort_views>}
    					<span class="active">浏览最多</span>
{<else>}
						<a href="{<$link_sort_views>}">浏览最多</a>
{</if>}
						<div class="clear"></div>
		</div>
		<hr/>
{<section name=i loop=$data_list start=0>}
		<div class="question-index">
			<div class="span-3">
				<div class="question-stats">
    				<div class="item">
    					<span style="color:#666;">[得分]</span>
    					<span class="color-score" style="font-size:1.1em;padding-left:1px;">{<$data_list[i].q_score>}</span>
    				</div>
    				<div class="item">
    					<span style="color:#666;">[答案]</span>
    					<span class="color-answer" style="font-size:1.1em;padding-left:1px;">{<$data_list[i].q_answer_quantity>}</span>
    				</div>
    				<div  class="item">
    					<span style="color:#666;">[关注]</span>
    					<span class="color-concerned" style="font-size:1.1em;padding-left:1px;">{<$data_list[i].q_concerned>}</span>
    				</div>
    				<div  class="item">
    					<span style="color:#666;">[浏览]</span>
    					<span class="color-views" style="font-size:1.1em;padding-left:1px;">{<$data_list[i].q_views>}</span>
    				</div>
    			</div>
			</div>
			<div class="span-14 last">
				<div class="question-main">
    				<div class="title">
    					<span class="mark {<$data_list[i].mark_color>}" title="{<$data_list[i].mark_title>}">&nbsp;</span>
    					<a href="{<$data_list[i].link_view_question>}" title="{<$data_list[i].q_title>}">{<$data_list[i].title|escape:'html'>}</a>
    				</div>
    				
    				<div class="span-15" style="height:24px;line-height:24px;">
    					<span class="span-8 tags" title="问题标签">
	{<section name=j loop=$data_list[i].tag_list start=0>}
    						<span title="{<$data_list[i].tag_list[j].t_description>}">
    							<a href="{<$data_list[i].tag_list[j].link>}">{<$data_list[i].tag_list[j].name>}</a>
    						</span>
	{</section>}
							&nbsp;
    					</span>
    					<span class="account-info span-6 last" title="{<$data_list[i].q_owner_id>} 问于 {<$data_list[i].q_ask_time>}">
    							{<$data_list[i].owner_id>}
    							<span style="color:#101F78;padding:0 1px;">({<$data_list[i].owner_score>}分)</span>
    							<span style="font-size:1.2em;color:#EA11EB;font-weight:bolder;margin: 0 2px;">?</span>
    							<span>{<$data_list[i].ask_time>}&nbsp;&nbsp;</span>
    					</span>
					</div>
    				
    				<div class="content">
    					{<$data_list[i].q_content|escape:'html'>}
    				</div>
    				
    				<div class="span-15" style="height:26px;line-height:26px;margin-bottom: 6px;">
    					<span class="span-8 question-thumbnails" title="" question="{<$data_list[i].q_id>}">
							&nbsp;
    					</span>
    {<if $data_list[i].q_lastanswer_id>}
    					<span class="account-info span-6 last" title="最新答案：{<$data_list[i].q_lastanswer_id>} 回答于 {<$data_list[i].q_lastanswer_time>}">
    						{<$data_list[i].lastanswer_id>}
    						<span style="color:#101F78;padding:0 1px;">({<$data_list[i].lastanswer_score>}分)</span>
    						<span style="font-size:1.2em;color:#7FAF1B;font-weight:bolder;padding: 0 2px;">!</span>
    						<span>{<$data_list[i].lastanswer_time>}&nbsp;&nbsp;</span>
    {<else>}
    					<span class="account-info span-6 last">
    						<a href="{<$data_list[i].link_view_question>}#answer">还没答案，我来回答</a>&nbsp;&nbsp;
    {</if>}
    					</span>
					</div>
				</div>
			</div>
		</div>
		
		<div class="question-index-hr" style="padding:0 6px;">
			<hr />
		</div>
{<sectionelse>}
		<div class="question-index">
			<span class="large prepend-1">没有找到符合条件的问题。赶快 <a href="{<$header_link_ask>}">提问</a> 一下吧！</span>
		</div>
{</section>}
{<if $data_list>}

{<if $smarty.const.FLAG_ENABLE_ADSENSE == 1 && 0>}
		<div style="padding-left: 15px;">
            <script type="text/javascript"><!--
            google_ad_client = "ca-pub-3547787795244750";
            /* 468x60图片广告 */
            google_ad_slot = "5686376773";
            google_ad_width = 468;
            google_ad_height = 60;
            //-->
            </script>
            <script type="text/javascript"
            src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
            </script>
        </div>
{</if>}

		<div class="pages">
			分页：{<$index_split_pages>}
		</div>
		<div class="steps">
			每页显示 {<$index_steps_select>} 个
		</div>
{</if>}
    </div>
    
    <div class="span-7 last" id="sidebar">
    	<div id="count" class="module">
    		<span style="font-size:3.3em;font-weight:bold;" title="符合当前条件的问题个数">{<$question_quantity>}</span>个问题
    	</div>

    	<div id="tags" class="module">
    		<h5>分类标签</h5>
    		<ul>
{<section name=i loop=$tag_list start=0>}
				<li>
					<a href="{<$tag_list[i].link>}" title="{<$tag_list[i].t_description>}" {<if $tag_list[i].active>}class="active"{</if>}>{<$tag_list[i].show_name>}</a>
	{<if $tag_list[i].active>}
					<span>[<a style="color: #CC0000;" href="{<$tag_list[i].link_clean_tag>}" title="清除标签 {<$tag_list[i].t_name>} 筛选">X</a>]</span>
	{</if>}
					<span style="font-weight:bold;color:#444;" title="标签 {<$tag_list[i].t_name>} 拥有的问题总数为 {<$tag_list[i].question_quantity>} 个">× {<$tag_list[i].question_quantity>}</span>
				</li>
{</section>}
			</ul>
		</div>
		
{<if $smarty.const.FLAG_ENABLE_ADSENSE == 1>}
		<div class="module">
			<div style="padding-left: 3px;">
	        	<script type="text/javascript"><!--
	            google_ad_client = "ca-pub-3547787795244750";
	            /* 右边栏广告 */
	            google_ad_slot = "3246311279";
	            google_ad_width = 250;
	            google_ad_height = 250;
	            //-->
	            </script>
	            <script type="text/javascript"
	            src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
	            </script>
	        </div>
        </div>
{</if>}

		<div id="hot" class="module">
			<h5>热点问题</h5>
			<ul>
{<section name=i loop=$question_most_concerned_list start=0>}
        		<li>
        			<a href="{<$question_most_concerned_list[i].link>}" title="{<$question_most_concerned_list[i].q_title>}">{<$question_most_concerned_list[i].title>}</a>
        		</li>
{</section>}
			</ul>
		</div>

		<div id="need" class="module">
			<h5>急需解答</h5>
			<ul>
{<section name=i loop=$question_most_need_answer_list start=0>}
        		<li>
        			<a href="{<$question_most_need_answer_list[i].link>}" title="{<$question_most_need_answer_list[i].q_title>}">{<$question_most_need_answer_list[i].title>}</a>
        		</li>
{</section>}
			</ul>
		</div>

		<div id="random" class="module">
			<h5>随机问题</h5>
			<ul>
{<section name=i loop=$question_random_list start=0>}
        		<li>
        			<a href="{<$question_random_list[i].link>}" title="{<$question_random_list[i].q_title>}">{<$question_random_list[i].title>}</a>
        		</li>
{</section>}
			</ul>
		</div>

    </div>

{<include file=$footer_tpl>}