<%@ 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">项目孵化</a>
        </div>
        <div class="xuanxiang03">
            <a href="<%=basePath%>/open/innovationActivity/index.htm" class="xuanxiangfont xuanxiangfont-active">创新活动</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="buxian" class="a<c:if test="${empty searchModel.activityType || searchModel.activityType eq '不限'}">0</c:if>4" onclick="search1('不限')">不限</a>
                        </li>
                        <c:forEach items="${activityType}" var="item">
                            <li class="li">
                                <a href="javascript:void(0); " onclick="search1('${item.key}')" class="a<c:if test="${searchModel.activityType 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 class="item">
                    <div class="zhuti1">活动时间：</div>
                    <ul class="item1">
                        <li class="li">
                            <a href="javascript:void(0);"onclick="search2('不限')" class="a<c:if test="${empty searchModel.activityTime || searchModel.activityType eq '不限'}">0</c:if>4">不限</a>
                        </li>
                        <li class="li">
                            <a href="javascript:void(0);"onclick="search2('今天')"  class="a<c:if test="${searchModel.activityType eq '今天'}">0</c:if>4">今天</a>
                        </li>
                        <li class="li">
                            <a href="javascript:void(0);" onclick="search2('明天')"   class="a<c:if test="${searchModel.activityType eq '明天'}">0</c:if>4">明天</a>
                        </li>
                        <li class="li">
                            <a href="javascript:void(0);" onclick="search2('最近7天')"   class="a<c:if test="${searchModel.activityType eq '最近7天'}">0</c:if>4">最近7天</a>
                        </li>
                        <li class="li">
                            <a href="javascript:void(0);" onclick="search2('最近30天')"   class="a<c:if test="${searchModel.activityType eq '最近30天'}">0</c:if>4">最近30天</a>
                        </li>

                    </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/innovationActivity/view.htm/${item.id}">${item.activityName}</a>
                                </div>
                                <div class="fuhua-name2">
                                        ${item.activityIntro}
                                </div>
                                <div class="list4">
                                    <span class="list-bottom">活动类型：<span class="list-bottom1">${item.activityType}</span></span>
                                    <span class="list-bottom2">报名时间：<span class="list-bottom1">${item.enrollTime}</span></span>
                                </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/innovationActivity/view.htm/${item.id}">${item.activityName}</a>
                                </div>
                                <div class="fuhua-name2">
                                        ${item.activityIntro}
                                </div>
                                <div class="list4">
                                    <span class="list-bottom">活动类型：<span class="list-bottom1">${item.activityType}</span></span>
                                    <span class="list-bottom2">报名时间：<span class="list-bottom1">${item.enrollTime}</span></span>
                                </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/innovationActivity/view.htm/${item.id}">${item.activityName}</a>
                            </div>
                            <div class="fuhua-name2">
                                    ${item.activityIntro}
                            </div>
                            <div class="list4">
                                <span class="list-bottom">活动类型：<span class="list-bottom1">${item.activityType}</span></span>
                                <span class="list-bottom2">报名时间：<span class="list-bottom1">${item.enrollTime}</span></span>
                            </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/innovationActivity/view.htm/${item.id}">${item.activityName}</a>
                    </div>
                    <div class="fuhua-name2">
                            ${item.activityIntro}
                    </div>
                    <div class="list4">
                        <span class="list-bottom">活动类型：<span class="list-bottom1">${item.activityType}</span></span>
                        <span class="list-bottom2">报名时间：<span class="list-bottom1">${item.enrollTime} </span></span>
                    </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/innovationActivity/view.htm/${item.id}">${item.activityName}</a>
                    </div>
                    <div class="fuhua-name2">
                            ${item.activityIntro}
                    </div>
                    <div class="list4">
                        <span class="list-bottom">活动类型：<span class="list-bottom1">${item.activityType}</span></span>
                        <span class="list-bottom2">报名时间：<span class="list-bottom1">${item.enrollTime}</span></span>
                    </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/innovationActivity/view.htm/${item.id}">${item.activityName}</a>
                    </div>
                    <div class="fuhua-name2">
                            ${item.activityIntro}
                    </div>
                    <div class="list4">
                        <span class="list-bottom">活动类型：<span class="list-bottom1">${item.activityType}</span></span>
                        <span class="list-bottom2">报名时间：<span class="list-bottom1">${item.enrollTime} </span></span>
                    </div>
                </div>
        </div>
        </c:if>
            </c:if>
            </c:forEach>
                <c:if test="${fn:length(list)%3!=0}">
            </div>
            </c:if>




                <%--<div class="chakan0"  id="gengduo">--%>
        <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>
                    <%--<span class="chakan"></span>--%>
                    <%--&nbsp&nbsp <a class="chakanfont" onclick="lookMore1()">查看更多</a> &nbsp&nbsp--%>
                    <%--<span class="chakan"></span>--%>
                <%--</div>--%>

            </div>
        </div>
    </div>


    <div class="clearfix"></div>
    <jsp:include page="../common/body_footer.jsp"></jsp:include>
    <input type="hidden" id="activityType" name="activityType" value="${searchModel.activityType}"/>
    <input type="hidden" id="activityTime" name="activityTime" value="${searchModel.activityTime}"/>
</body>
<script>
    function add() {
        location.href="<%=basePath%>/open/innovationActivity/add.htm";
    }
    function search1(obj) {
        //
        var  str1="";
        var  str2="";
        if (obj != null&& obj != '' && obj != undefined ) {
            str2 = "activityType=" + obj;
        }
        if ($("#activityTime").val() != null && $("#activityTime").val() != '' && $("#activityTime").val() != undefined) {
            str1 = "&activityTime=" + $("#activityTime").val();
        }
        window.location.href = "<%=basePath%>/open/innovationActivity/index.htm?" + str2 + str1 ;
    }
    function search2(obj) {
        var  str1="";
        var  str2="";
        if (obj != null&& obj != '' && obj != undefined ) {
            str2 = "activityTime=" + obj;
        }
        if ($("#activityType").val() != null && $("#activityType").val() != '' && $("#activityType").val() != undefined) {
            str1 = "&activityType=" + $("#activityType").val();
        }
        window.location.href = "<%=basePath%>/open/innovationActivity/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/innovationActivity/index.htm?activityType=${searchModel.activityType}"+
            "&activityTime=${searchModel.activityTime}&pageNo="+pageNo+"";
    }





</script>
</html>