<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>KGCMS企业应用管理平台 - Powered by KGCMS</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="renderer" content="webkit">
<!-- <meta http-equiv="cache-control" content="no-siteapp" /> -->
<link rel="stylesheet" href="{{ kg['tpl_url'] }}style/vote_sys_manage.css">
<script src="{{ kg['tpl_url'] }}script/jquery.min.js"></script>
<script src="{{ kg['server']['HTTP_HOST'] }}/tools/amazeui/js/amazeui.min.js"></script>
<script src="{{kg['tpl_url']}}script/common.js"></script>
<script src="{{kg['tpl_url']}}script/vote_sys_manage.js"></script>
</head>
<body data-type="generalComponents">
    {% include 'component_header.tpl' %}
    <div class="tpl-page-container tpl-page-header-fixed">
        {% include 'component_left.tpl' %}
        <div class="tpl-content-wrapper ngco-Osz-marginT">
            <div class="tpl-content-page-title">
                投票主题及候选信息
            </div>
            <ol class="am-breadcrumb">
                <li><a href="./" class="am-icon-home">首页</a></li>
                <li class="am-active">投票主题及候选信息</li>
            </ol>
            <div class="tpl-portlet-components">
                <div class="portlet-title">
                    <div class="caption font-green bold">
                        <span class="am-icon-code"></span>&nbsp;投票主题及候选信息
                    </div>
                    <div class="tpl-portlet-input tpl-fz-ml am-select-hover am-no-margintop ngsty-boxR">
                        <div class="ngar-xiugai-width portlet-input input-small input-inline" style="float: right;">
                            <div class="input-icon right am-fr top-1">
                                <div class="am-btn-group am-btn-group-xs">
                                    <a href="vote_sys_manage" class="am-btn am-btn-secondary ng-add-hightB"><span class="am-icon-search"></span>&nbsp;刷新</a>
                                    <a class="am-btn am-btn-default am-btn-warning" href="vote_sys_update"><span class="am-icon-plus"></span>&nbsp;创建主题</a>
                                </div>
                            </div>
                        </div>
                        <div class="portlet-input input-small input-inline am-fl" style="float: right;">
							<form action="" method="get" id="search">
								<div class="input-icon right">
									<i class="am-icon-search log-search"></i>
									<input type="text" class="ngar-Vxiugai-radius form-control am-hover form-control-solid ngco-Alo-Noborder" placeholder="搜索..." name="word" value="{{word}}" id="word">
								</div>
							</form>
						</div>
                        <div class="am-form-group am-fl am-select-hover am-no-marginbtm am-no-outline" style="margin-right:10px;float: right;">
                            <form action="" method="get">
                                <input type="hidden" id="sort" value="{{sort}}">
                                <select class="ngca-Ysj-change"  onchange="window.open(this.options[this.selectedIndex].value,'_self')" data-am-selected="{btnSize: 'sm'}">
                                    <option  value="">数据筛选</option>
                                    <option  value="vote_sys_manage?sorts=0">最新</option>
                                    <option  value="vote_sys_manage?sorts=1">热门</option>
                                    <option  value="vote_sys_manage?sorts=2">综合</option>
                                </select>
                            </form>
						</div>
                    </div>
                </div>
                <div class="am-g">
                    <div class="am-u-sm-12 ngALL-AFenyeFu-marginT ngco-No-paddingR">
                        <form class="am-form" id="id-form" action="" method="post">
                            <!--<input type="hidden" name="action" value="" id='action'>-->
                            <table class="am-table am-table-striped am-table-hover table-main ngco-Esz-mgibdr">
                                <thead>
                                    <tr>
                                        <!--<th class="table-check"></th>-->
                                        <th class="table-id">排序</th>
                                        <th class="table-title">缩略图</th>
                                        <th class="table-title">主题名称</th>
                                        <th class="table-type">投票数(真实/虚拟)</th>
                                        <!--<th class="table-author am-hide-sm-only">投票人总数</th>-->
                                        <th class="table-date am-hide-sm-only">访问量</th>
                                        <th class="table-type">投票发起时间</th>
                                        <th class="table-type">投票结束时间</th>
                                        <th class="table-set">操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    {% for row in data %}
                                    <tr>
                                        <!--<td><input type="checkbox" name="id" class='uid checkbox-middle' value="{{row['id']}}"></td>-->
                                        <td>
											<div class="ng4_width ng4-width-border">
												<input name="sort" value="{{row['sort']}}" type="text" size="4" class="zty-sort">
												<input type="hidden" name="sorted" value="{{row['sort']}}">
											</div>
                                            <!--<div class="ng4_width ng4-width-border">-->
												<!--<input name="sort" value="{{row['sort']}}" type="text" size="4" class="zty-sort">-->
												<!--<input type="hidden" name="sorted" value="{{row['id']}}">-->
											<!--</div>-->
										</td>
                                        <!--<td>{{row['id']}}</td>-->
                                        <td><img src="{{row.image[0]}}" alt="" height="30"></td>
                                        <td><a href="{{kg['server']['HTTP_HOST']}}/vote_sys?id={{row['id']}}">{{row['title']}}</a></td>
                                        <td><a href="{{kg['server']['HTTP_HOST']}}/{{kg['globals']['admin_dir']}}/vote_sys_logs?id={{row['id']}}">{{row.truenumb}}/{{row['numbers']}}</a></td>
                                        <!--<td class="am-hide-sm-only">{{row['votesum']}}</td>-->
                                        <td class="am-hide-sm-only">{{row['traffic']}}</td>
                                        <td>{{row['starttime']}}</td>
                                        <td>{{row['stoptime']}}</td>
                                        <td>
                                            <div class="am-btn-toolbar">
                                                <div class="am-btn-group am-btn-group-xs">
                                                    <a href="vote_sys_update?action=edit&id={{row['id']}}" class="am-btn am-btn-default am-btn-xs am-text-default am-hide-sm-only">
                                                        <span class="am-icon-pencil-square-o"></span>&nbsp;编辑
                                                    </a>
                                                    <a href="vote_sys_logs?id={{row['id']}}" class="am-btn am-btn-default am-btn-xs am-publish-bright title2div">
                                                        <span class="am-icon-reorder"></span>&nbsp;投票详情
                                                    </a>
                                                    <!-- <a href="vote_sys_manage?action=wechat&id={{row['id']}}" class="am-btn am-btn-default am-btn-xs am-hide-sm-only am-text-warning am-audit-bright title2div" data-am-modal="{target: '#wechat-modal'">
                                                        <span class="am-icon-qrcode"></span>&nbsp;扫码查看
                                                    </a> -->
                                                    <a class="am-btn am-btn-default am-btn-xs am-hide-sm-only am-text-warning am-audit-bright title2div wechat_bnt"  id="{{row['id']}}"  data-am-modal="{target: '#wechat-modal'}">
                                                        <span class="am-icon-qrcode"></span>&nbsp;扫码查看
                                                    </a>
                                                    <a href="vote_sys_manage?action=del&id={{row['id']}}" class="am-btn am-btn-default am-btn-xs am-text-danger ngro-Jclick-shanchubi">
                                                        <span class="am-icon-trash-o"></span>&nbsp;删除
                                                    </a>
                                                </div>
                                            </div>
                                        </td>
                                    </tr>
                                    {% endfor %}
                                </tbody>
                            </table>
                            {% if not data %}
                            <div class="no-data">
                                <ul>没有相关数据</ul>
                            </div>
                            {% endif %}

                        <div class="tpl-portlet-input tpl-fz-ml tpl-add-fl">
								<div class="am-btn-toolbar">
									<div class="am-btn-group am-btn-group-xs ng4-width-byn">
										<button class="am-btn am-btn-success" id="addList" type="submit"><span class="am-icon-refresh"></span>&nbsp;更新</button>
									</div>
								</div>
							</div>
							<input type="hidden" name="action" value="sort">
                        </form>
                    </div>
                </div>
            </div>
            {% include 'component_footer.tpl' %}
        </div>
    </div>
    <div class="am-modal am-modal-no-btn" tabindex="-1" id="wechat-modal">
        <div class="am-modal-dialog">
            <!-- <div class="am-modal-hd">
                <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
            </div> -->
            <div class="am-modal-bd">
                <div style="text-align: center;"><img src="" alt="" width="200"></div>
            </div>
        </div>
    </div>
</body>
</html>
<script>
    $(function(){
        $(".wechat_bnt").on("click",function(){
            var id_= $(this).attr("id");
            var src_='{{kg['server']['HTTP_HOST']}}/upload/vote_sys/qrcode/vote_sys_'+id_+'.png'
            $("#wechat-modal img").attr("src", src_);
        })
    })
</script>