<?php
use app\components\QuestionHelper;
use app\components\StringHelper;
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>编辑</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, maximum-scale=1">
  <meta name="apple-mobile-web-app-status-bar-style" content="black"> 
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="format-detection" content="telephone=no">
  
  <link rel="stylesheet" href="/plugins/layui/css/layui.css">
  <link rel="stylesheet" href="/plugins/fontawesome/css/font-awesome.min.css" />
  <link rel="stylesheet" href="/public/css/global.css">

  <script src="/public/js/jquery-1.11.3.min.js"></script>
  <script src="/public/js/jquery.form-3.36.0.min.js"></script>
  
</head>
<body>

<div class="layui-fluid" style="padding-left: 10px; padding-right: 10px; margin-top: 10px;">
<form class="layui-form" id="list_form" method="post">
<table class="layui-table" lay-skin="line">
  <thead>
    <tr>
      <th>题目</th>
      <th>类型</th>
      <th>难度</th>
      <th>操作</th>
    </tr> 
  </thead>
  <tbody id="pagelistbox">
    <?php foreach($resources as $oneresour){ ?>
      <?php 
      $stemtitle = strip_tags($oneresour->content);
      $stemtitle = StringHelper::loseSpace($stemtitle);
      ?>
    <tr>
      <td title="<?php echo $stemtitle; ?>"><?php echo StringHelper::utf8Substr($stemtitle,0,30); ?></td>
      <td><?php echo QuestionHelper::ShowStemtypeName($oneresour->typechild); ?></td>
      <td><?php echo QuestionHelper::ShowLevelsName($oneresour->levels); ?></td>
      <td><a class="layui-btn layui-btn-sm" title="预览" onclick="javascript:parent.showResourViewBox(<?php echo $oneresour->id; ?>);">预览</a></td>
    </tr>
    <?php } ?>
  </tbody>
</table>
</form>
</div>

<script src="/plugins/layui/layui.all.js"></script>
</body>
</html>