<%@ page language="java" pageEncoding="UTF-8"
         contentType="text/html; charset=UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
    String basePath = request.getContextPath();
    String resourcePath = basePath + "/resource";
%>
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>创业孵化</title>
    <jsp:include page="../common/head.jsp"></jsp:include>
</head>
<body>
<jsp:include page="../common/body_header.jsp"></jsp:include>

<div class="makerbanner">
</div>
<div class="mid5">
    <div class="line"></div>
    <div class="box2">

        <div class="xuanxiang03">
            <a href="<%=basePath%>/open/EntrepreneurshipTutoring/index.action" class="xuanxiangfont">创业辅导</a>
        </div>
        <div class="xuanxiang01">
            <a href="<%=basePath%>/open/roadShow/index.htm" class="xuanxiangfont xuanxiangfont-active">项目孵化</a>
        </div>
        <div class="xuanxiang03">
            <a href="<%=basePath%>/open/innovationActivity/index.htm" class="xuanxiangfont">创新活动</a>
        </div>
        <div class="yifankui1">
            <img src="<%=resourcePath%>/images/fabu1.png" onclick="add()" alt="" class="fbimg" title="发布项目">
        </div>
    </div>
    <div class="fuhua-mid">
        <div class="fuhua-mid0">

            <div class="filter1">
                <div class="item">
                    <div class="zhuti1">行业领域：</div>
                    <ul class="item1">
                        <li class="li">
                            <a href="javascript:void(0); " id="li1a"  onclick="search1('不限')"class="a<c:if test="${empty searchModel.tradeField || searchModel.tradeField eq '不限'}">0</c:if>4">不限</a>
                        </li>
                        <c:forEach items="${roadShowTrade}" var="item">
                            <li class="li">
                                <a href="javascript:void(0); " onclick="search1('${item.key}')" class="a<c:if test="${searchModel.tradeField eq item.key}">0</c:if>4">${item.key}</a>
                            </li>
                        </c:forEach>

                    </ul>
                    <div class="icon2"><a href="javascript:void(0); "><img src="<%=resourcePath%>/images/icon_top.png" ></a></div>
                </div>
                <div class="item">
                    <div class="zhuti1">项目阶段：</div>
                    <ul class="item1">
                        <li class="li">
                            <a href="javascript:void(0);" id="li2a" onclick="search2('不限')" class="a<c:if test="${empty searchModel.projectPhase || searchModel.projectPhase eq '不限'}">0</c:if>4">不限</a>
                        </li>
                        <c:forEach items="${roadShowStage}" var="item">
                            <li class="li">
                                <a href="javascript:void(0); " onclick="search2('${item.key}')" class="a<c:if test="${searchModel.projectPhase eq item.key}">0</c:if>4">${item.key}</a>
                            </li>
                        </c:forEach>
                    </ul>
                    <div class="icon2"><a href="##"><img src="<%=resourcePath%>/images/icon_top.png" ></a></div>
                </div>
            </div>
            <div class="clearfix"></div>
            <div class="fuhua-list">
                <div class="fuhua-list11">

                        <c:forEach items="${list}" var="item" begin="0" varStatus="cou">
                        <c:if test="${cou.count<=3  }">
                        <c:if test="${cou.count%3==1}">
                            <div class="fuhua-list010">
                                <div class="fuhua-img">
                                    <img style="width: 370px;height: 220px;border-radius: 6px"  src="${imageContextPath}${item.thumbnail}" alt="">
                                </div>
                                <div class="clearfix"></div>
                                <div class="fuhua-name1">
                                    <a href="<%=basePath%>/open/roadShow/view.htm/${item.id}">${item.roadshowName}</a>
                                </div>
                                <div class="fuhua-name2">
                                        ${item.roadshowIntro}
                                </div>

                            </div>
                        </c:if>
                        <c:if test="${cou.count%3==2}">
                            <div class="fuhua-list020">
                                <div class="fuhua-img">
                                    <img style="width: 370px;height: 220px;border-radius: 6px"  src="${imageContextPath}${item.thumbnail}" alt="">
                                </div>
                                <div class="clearfix"></div>
                                <div class="fuhua-name1">
                                    <a href="<%=basePath%>/open/roadShow/view.htm/${item.id}">${item.roadshowName}</a>
                                </div>
                                <div class="fuhua-name2">
                                        ${item.roadshowIntro}
                                </div>

                            </div>
                        </c:if>
                        <c:if test="${cou.count%3==0}">
                        <div class="fuhua-list020">
                            <div class="fuhua-img">
                                <img style="width: 370px;height: 220px;border-radius: 6px" src="${imageContextPath}${item.thumbnail}" alt="">
                            </div>
                            <div class="clearfix"></div>
                            <div class="fuhua-name1">
                                <a href="<%=basePath%>/open/roadShow/view.htm/${item.id}">${item.roadshowName}</a>
                            </div>
                            <div class="fuhua-name2">
                                    ${item.roadshowIntro}
                            </div>

                        </div>
                    </div>
                    </c:if>
                        <%--<c:if test="${fn:length(list)%3!=0}">--%>
                        <%--</div>--%>
                        <%--</c:if>--%>
                    </c:if>


                    <c:if test="${cou.count>3  }">
                        <c:if test="${cou.count%3==1}">
                            <div class="fuhua-list21">
                            <div class="fuhua-list010">
                                <div class="fuhua-img">
                                    <img style="width: 370px;height: 220px;border-radius: 6px"  src="${imageContextPath}${item.thumbnail}" alt="">
                                </div>
                                <div class="clearfix"></div>
                                <div class="fuhua-name1">
                                    <a href="<%=basePath%>/open/roadShow/view.htm/${item.id}">${item.roadshowName}</a>
                                </div>
                                <div class="fuhua-name2">
                                        ${item.roadshowIntro}
                                </div>

                            </div>
                        </c:if>
                        <c:if test="${cou.count%3==2}">
                            <div class="fuhua-list020">
                                <div class="fuhua-img">
                                    <img style="width: 370px;height: 220px;border-radius: 6px"  src="${imageContextPath}${item.thumbnail}" alt="">
                                </div>
                                <div class="clearfix"></div>
                                <div class="fuhua-name1">
                                    <a href="<%=basePath%>/open/roadShow/view.htm/${item.id}">${item.roadshowName}</a>
                                </div>
                                <div class="fuhua-name2">
                                        ${item.roadshowIntro}
                                </div>

                            </div>
                        </c:if>
                        <c:if test="${cou.count%3==0}">
                            <div class="fuhua-list020">
                                <div class="fuhua-img">
                                    <img style="width: 370px;height: 220px;border-radius: 6px"  src="${imageContextPath}${item.thumbnail}" alt="">
                                </div>
                                <div class="clearfix"></div>
                                <div class="fuhua-name1">
                                    <a href="<%=basePath%>/open/roadShow/view.htm/${item.id}">${item.roadshowName}</a>
                                </div>
                                <div class="fuhua-name2">
                                        ${item.roadshowIntro}
                                </div>

                            </div>
                            </div>
                        </c:if>
                    </c:if>
                    </c:forEach>
                    <c:if test="${fn:length(list)%3!=0}">

                </div>
                </c:if>

                <jsp:include page="../common/pager.jsp">
                    <jsp:param name="pageNo" value="${pager.pageNo}"/>
                    <jsp:param name="pageSize" value="${pager.pageSize}"/>
                    <jsp:param name="total" value="${pager.total}"/>
                </jsp:include>

            </div>

        </div>
    </div>


    <div class="clearfix"></div>
    <jsp:include page="../common/body_footer.jsp"></jsp:include>

    <input type="hidden" id="tradeField" name="tradeField" value="${searchModel.tradeField}"/>
    <input type="hidden" id="projectPhase" name="projectPhase" value="${searchModel.projectPhase}"/>
</body>
<script>
    function add() {
        location.href="<%=basePath%>/open/roadShow/add.htm";
    }
    function search1(obj) {
        $("#li1a").removeClass("a04");
        $(obj).attr("class","a04");
        var  str1="";
        var  str2="";
        if (obj != null&& obj != '' && obj != undefined ) {
            str2 = "tradeField=" + obj;
        }
        if ($("#projectPhase").val() != null && $("#projectPhase").val() != '' && $("#projectPhase").val() != undefined) {
            str1 = "&projectPhase=" + $("#projectPhase").val();
        }
        window.location.href = "<%=basePath%>/open/roadShow/index.htm?" + str2 + str1 ;
    }
    function search2(obj) {
        $("#li2a").removeClass("a04");
        $(obj).attr("class","a04");
        var  str1="";
        var  str2="";
        if (obj != null&& obj != '' && obj != undefined ) {
            str2 = "projectPhase=" + obj;
        }
        if ($("#tradeField").val() != null && $("#tradeField").val() != '' && $("#tradeField").val() != undefined) {
            str1 = "&tradeField=" + $("#tradeField").val();
        }
        window.location.href = "<%=basePath%>/open/roadShow/index.htm?" + str2 + str1 ;
    }

    $("#pager a").not(".disabled").click(function () {
        var pageNo = $(this).attr("page");
        pageSearch(pageNo);
    });

    function pageSearch(pageNo) {
        debugger;
        window.location.href = "<%=basePath%>/open/roadShow/index.htm?tradeField=${searchModel.tradeField}"+
            "&projectPhase=${searchModel.projectPhase}&pageNo="+pageNo+"";
    }
</script>
</html>