<%
{$I ../../inc/public._ps}
var
  I, J: Integer;
  S,T, tbN, ln1, ln2, ln3: String;
  F: TCTMetaField;
  col: Integer;
begin
  tbN:=GetLabelText(CurTable);
%>

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>${tbN}</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
  <link rel="stylesheet" href="../../layuiadmin/style/template.css" media="all">
  <style>
    .layadmin-caller em{color:#ababab;}
  </style>
</head>
<body>

  <div class="layui-fluid">
    <div class="layadmin-caller">
      <form class="layui-form caller-seach" action="">
              <i class="layui-icon layui-icon-search caller-seach-icon caller-icon"></i>
              <input type="text" name="title" required  lay-verify="required" placeholder="请输入搜索内容" autocomplete="off" class="layui-input caller-pl32">
              <i class="layui-icon layui-icon-close caller-dump-icon caller-icon"></i>
      </form>
      <div class="layui-tab layui-tab-brief caller-tab" lay-filter="docDemoTabBrief">
        <ul class="layui-tab-title">
          <li class="layui-this">全部</li>
          <li>热门</li>
          <li>最近</li>
        </ul>
      </div>
      <div class="caller-contar">
<%
  for J:=0 to 9 do
  begin
    col := 0;
	ln1 := '';
	ln2 := '';
	ln3 := '';
    for I:=0 to CurTable.MetaFields.Count-1 do
    begin
      F:=CurTable.MetaFields.Items[I];
      if not F.CanDisplay('grid') then
        Continue;
      S:=F.GenDemoData(1, '', nil);;

	  //T := T+'"'+F.Name+'": "'+S+'"'
	  T := S;

	  if col=0 then
	    ln1 := T
	  else if col<=2 then
	    ln2 := Trim(ln2 + ' '+T)
	  else if col <=4 then
	    ln3 := Trim(ln3 + ' '+T);

      col := col + 1;
    end;
%>
        <div class="caller-item">
          <img src="../../layuiadmin/style/res/template/image-none.png" alt="" class="caller-img caller-fl">
          <div class="caller-main caller-fl">       
            <p><strong>${ln1}</strong></p>
            <p class="caller-adds">${ln2}</p>
            <p><em>${ln3}</em></p>
          </div>
          <div class="caller-fr">
			  <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit"></i>编辑</a>
          </div>
        </div>
<%
  end;
%>
      </div>
      <div id="demo1"></div>
    </div>
  
  <script src="../../layuiadmin/layui/layui.js"></script>  
  <script>
  layui.config({
    base: '../../layuiadmin/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index', 'laypage','layer'], function(){
    var laypage = layui.laypage,layer = layui.layer;
      laypage.render({
    elem: 'demo1'
    ,count: 40 //数据总数

  });
    
  });
  </script>
</body>
</html>
<%
end.
%>