<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="/common/template :: header(~{::title},~{::link},~{::style})"></head>

<body class="timo-layout-page">
<div class="layui-card">
    <div class="layui-card-header timo-card-header">
        <span><i class="fa fa-bars"></i> 编译配置列表</span>
        <i class="layui-icon layui-icon-refresh refresh-btn"></i>
    </div>
    <div class="layui-card-body">
        <div class="layui-row timo-card-screen put-row">
            <div class="pull-right screen-btn-group">
                <div class="btn-group-right">
                    <button class="layui-btn open-popup" data-title="添加编译配置" th:attr="data-url=@{/build/compiler/add}"
                            data-size="max">
                        <i class="fa fa-plus"></i> 添加
                    </button>
                </div>
            </div>
        </div>
        <div class="timo-table-wrap">
            <table class="layui-table timo-table">
                <thead>
                <tr>
                    <th class="sortable" data-field="type">编译类型</th>
                    <th class="sortable" data-field="name">编译名字</th>
                    <th class="sortable" data-field="homePath">编译器主目录</th>
                    <th class="sortable" data-field="compilerImage">编译器镜像</th>
                    <th class="sortable" data-field="binds">镜像映射</th>
                    <th class="sortable" data-field="cmd">命令</th>
                    <th class="sortable" data-field="version">版本</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <tr th:each="item:${list}">
                    <td th:text="${item.type}">编译类型</td>
                    <td th:text="${item.name}">编译名字</td>
                    <td th:text="${item.homePath}">编译器主目录</td>
                    <td th:text="${item.compilerImage}">编译器镜像</td>
                    <td>
                        <a class="open-popup" data-title="镜像映射" th:attr="data-url=@{'/build/compiler/bind/'+${item.id}}"
                           data-size="720,480" href="#">查看</a>
                    </td>
                    <td>
                        <a class="open-popup" data-title="命令" th:attr="data-url=@{'/build/compiler/detail/'+${item.id}}"
                           data-size="720,480" href="#">查看</a>
                    </td>
                    <td>
                        <a class="open-popup" th:attr="data-title='编译器 ' + ${item.name} + ' 版本', data-url=@{'/build/compiler/version/'+${item.id}}"
                           data-size="720,480" href="#">查看</a>
                    </td>
                    <td>
                        <a class="open-popup" data-title="修改命令" th:attr="data-url=@{'/build/compiler/edit/'+${item.id}}"
                           data-size="720,480" href="#">编辑</a>
                        <a class="ajax-delete" th:attr="data-msg='确定要删除 '+ ${item.name} + '?'"
                           th:href="@{'/api/build/compiler/' + ${item.id}}">删除</a>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
        <div th:replace="/common/fragment :: page"></div>
    </div>
</div>

<script th:replace="/common/template :: script"></script>
<script type="text/javascript">
</script>
</body>
</html>