<%@ 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 uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%
    String basePath = request.getContextPath();
%>
<!-- 引入 echarts.js -->
<script src="<%=basePath%>/resource/plugins/echarts/echarts.min.js"></script>
<div class="table-responsive">
    <table class="table table-striped table-bordered table-hover ">
        <thead>
        <tr>
            <th>资源名称</th>
            <th>资源类型</th>
            <th>所属机构</th>
            <th>授权属性</th>
            <th>标签</th>
        </tr>
        </thead>
        <tbody>
        <c:choose>
            <c:when test="${list!=null}">
                <c:forEach items="${list}" var="item">
                    <tr>
                        <td>
                            <a onclick="noImageListShowResource('${item.id}')">${item.resourceName}</a>
                        </td>
                        <td>${item.resourceType}</td>
                        <td>${item.providerName}</td>
                        <td><a onclick="noImageListShowTheme('${item.shareType}')">${item.shareType}</a></td>
                        <td>${item.serviceTag}</td>
                    </tr>
                </c:forEach>
            </c:when>
            <c:otherwise>
                <tr>
                    <td colspan="4">无数据</td>
                </tr>
            </c:otherwise>
        </c:choose>
        </tbody>
    </table>
</div>
<jsp:include page="../../../common/admin/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>
<script type="text/javascript">
   function noImageListShowTheme(shareType) {
       $.popBsPartial({
           url: "<%=basePath%>/admin/resourceShareImg/theme.htm?theme=" + shareType,
           size: WySharpSize.Middle
       });
   }

   function noImageListShowResource(id) {
       $.popBsPartial({
           url: "<%=basePath%>/admin/resourceShareImg/property.htm?resourceId=" + id,
           size: WySharpSize.Middle
       });
   }


</script>